Package org.eclipse.gef.ui.palette
Class FlyoutPaletteComposite
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.gef.ui.palette.FlyoutPaletteComposite
- All Implemented Interfaces:
- Drawable
The FlyoutPaletteComposite is used to show a flyout palette alongside another
 control. The flyout palette auto-hides (thus maximizing space) when not in
 use, but can also be pinned open if so desired. It will only be visible when
 the PaletteView is not.
- Since:
- 3.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceFlyoutPreferences is used to save/load the preferences for the flyout palette.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intOne of the two possible initial states of the flyout palette.static final intOne of the two possible initial states of the flyout palette.
- 
Constructor SummaryConstructorsConstructorDescriptionFlyoutPaletteComposite(Composite parent, int style, IWorkbenchPage page, PaletteViewerProvider pvProvider, FlyoutPaletteComposite.FlyoutPreferences preferences) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.This is a convenient method to get a default FlyoutPreferences object.voidThis method hooks a DropTargetListener that collapses the flyout patette when the user drags something from the palette and moves the cursor to the primary viewer's control.voidlayout(boolean changed) voidsetExternalViewer(PaletteViewer viewer) If an external palette viewer is provided, palette state (that is captured inPaletteViewer.saveState(IMemento)-- active tool, drawer expansion state, drawer pin state, etc.) will be maintained when switching between the two viewers.voidsetGraphicalControl(Control graphicalViewer) Sets the control along the side of which the palette is to be displayed.Methods inherited from class org.eclipse.swt.widgets.Compositechanged, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, redraw, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.ScrollablecomputeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsModeMethods inherited from class org.eclipse.swt.widgets.ControladdControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.WidgetaddDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setDataMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.swt.graphics.DrawableisAutoScalable
- 
Field Details- 
STATE_COLLAPSEDpublic static final int STATE_COLLAPSEDOne of the two possible initial states of the flyout palette. This is the default one. When in this state, only the flyout palette's sash is visible.- See Also:
 
- 
STATE_PINNED_OPENpublic static final int STATE_PINNED_OPENOne of the two possible initial states of the flyout palette. When in this state, the flyout palette is completely visible and pinned open so that it doesn't disappear when the user wanders away from the flyout.- See Also:
 
 
- 
- 
Constructor Details- 
FlyoutPaletteCompositepublic FlyoutPaletteComposite(Composite parent, int style, IWorkbenchPage page, PaletteViewerProvider pvProvider, FlyoutPaletteComposite.FlyoutPreferences preferences) Constructor- Parameters:
- parent- The parent Composite
- style- The style of the widget to construct; only SWT.BORDER is allowed
- page- The current workbench page
- pvProvider- The provider that is to be used to create the flyout palette
- preferences- To save/retrieve the preferences for the flyout
 
 
- 
- 
Method Details- 
createFlyoutPreferences@Deprecated(forRemoval=true, since="3.22.0") public static FlyoutPaletteComposite.FlyoutPreferences createFlyoutPreferences(Preferences prefs) Deprecated, for removal: This API element is subject to removal in a future version.UsecreateFlyoutPreferences(IPreferenceStore)instead. This method will be removed after the 2027-06 release.This is a convenient method to get a default FlyoutPreferences object. The returned FlyoutPreferences does not save any changes made to the givenPreferences. It's upto the owner plugin tosavethe changes before itstops.- Parameters:
- prefs-- a plugin's Preferences
- Returns:
- a default implementation of FlyoutPreferences that stores the settings in the given Preferences
- Since:
- 3.2
 
- 
createFlyoutPreferencespublic static FlyoutPaletteComposite.FlyoutPreferences createFlyoutPreferences(IPreferenceStore prefs) This is a convenient method to get a default FlyoutPreferences object.- Parameters:
- prefs- an- IPreferenceStore
- Returns:
- a default implementation of FlyoutPreferences that stores the settings in the given Preferences
- Since:
- 3.22
 
- 
layoutpublic void layout(boolean changed) 
- 
setExternalViewerIf an external palette viewer is provided, palette state (that is captured inPaletteViewer.saveState(IMemento)-- active tool, drawer expansion state, drawer pin state, etc.) will be maintained when switching between the two viewers. Providing an external viewer, although recommended, is optional.- Parameters:
- viewer- The palette viewer used in the PaletteView
 
- 
setGraphicalControlSets the control along the side of which the palette is to be displayed. The given Control should be a child of this Composite. This method should only be invoked once.- Parameters:
- graphicalViewer- the control of the graphical viewer; cannot be- null
 
- 
hookDropTargetListenerThis method hooks a DropTargetListener that collapses the flyout patette when the user drags something from the palette and moves the cursor to the primary viewer's control. If the auto-hide feature of the palette is to work properly when dragging, this method should be called before any other drop target listeners are added to the primary viewer.- Parameters:
- viewer- the primary viewer
 
 
- 
createFlyoutPreferences(IPreferenceStore)instead.