Package org.eclipse.gef.ui.views.palette

# Class PaletteViewerPage

java.lang.Object
org.eclipse.ui.part.Page
org.eclipse.gef.ui.views.palette.PaletteViewerPage

All Implemented Interfaces:
  `IAdaptable`, `PalettePage`, `IPage`, `IPageBookViewPage`

Direct Known Subclasses:
  `GraphicalEditorWithFlyoutPalette.CustomPalettePage`

public class PaletteViewerPage extends Page implements PalettePage, IAdaptable
The default page for the PaletteView that works in conjunction with a PaletteViewerProvider.

Since:
  3.0

## Field Summary

Fields
Modifier and Type
Field
Description
`protected PaletteViewerProvider`
`provider`
The PaletteViewerProvider that is used to create the PaletteViewer
`protected PaletteViewer`
`viewer`
The PaletteViewer created for this page

## Constructor Summary

Constructors
Constructor
Description
`PaletteViewerPage(PaletteViewerProvider pvProvider)`
Constructor

## Method Summary

Modifier and Type
Method
Description
`void`
`createControl(Composite parent)`
Creates the palette viewer and its control.
`void`
`dispose()`
Releases the palette viewer from the edit domain
`<T> T`
`getAdapter(Class<T> adapter)`
`Control`
`getControl()`
`void`
`setFocus()`
Sets focus on the palette's control

### Methods inherited from class org.eclipse.ui.part.Page

`getSite, init, makeContributions, setActionBars`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.ui.part.IPage

`setActionBars`

### Methods inherited from interface org.eclipse.ui.part.IPageBookViewPage

`getSite, init`

## Field Details

### provider

protected PaletteViewerProvider provider
The PaletteViewerProvider that is used to create the PaletteViewer

### viewer

protected PaletteViewer viewer
The PaletteViewer created for this page

## Constructor Details

### PaletteViewerPage

public PaletteViewerPage(PaletteViewerProvider pvProvider)
Constructor

Parameters:
  `pvProvider` - the provider used to create the palette viewer

## Method Details

### createControl

public void createControl(Composite parent)
Creates the palette viewer and its control.

Specified by:
  `createControl` in interface `IPage`
Specified by:
  `createControl` in class `Page`
See Also:
  - `Page.createControl(org.eclipse.swt.widgets.Composite)`

### dispose

public void dispose()
Releases the palette viewer from the edit domain

Specified by:
  `dispose` in interface `IPage`
Overrides:
  `dispose` in class `Page`
See Also:
  - `Page.dispose()`

### getAdapter

public <T> T getAdapter(Class<T> adapter)

Specified by:
  `getAdapter` in interface `IAdaptable`
See Also:
  - `IAdaptable.getAdapter(java.lang.Class)`

### getControl

public Control getControl()

Specified by:
  `getControl` in interface `IPage`
Specified by:
  `getControl` in class `Page`
Returns:
  the palette viewer's control
See Also:
  - `Page.getControl()`

### setFocus

public void setFocus()
Sets focus on the palette's control

Specified by:
  `setFocus` in interface `IPage`
Specified by:
  `setFocus` in class `Page`
See Also:
  - `Page.setFocus()`