Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.ui.palette
Class FlyoutPaletteComposite

java.lang.Object
  extended byComposite
      extended by
org.eclipse.gef.ui.palette.FlyoutPaletteComposite

public class FlyoutPaletteComposite
extends Composite

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
See Also:
Serialized Form

Nested Class Summary
static interface FlyoutPaletteComposite.FlyoutPreferences
          FlyoutPreferences is used to save/load the preferences for the flyout palette.
 
Field Summary
static int STATE_COLLAPSED
          One of the two possible initial states of the flyout palette.
static int STATE_PINNED_OPEN
          One of the two possible initial states of the flyout palette.
 
Constructor Summary
FlyoutPaletteComposite (Composite parent, int style, IWorkbenchPage page, PaletteViewerProvider pvProvider, FlyoutPaletteComposite.FlyoutPreferences preferences)
          Constructor
 
Method Summary
static  FlyoutPaletteComposite.FlyoutPreferences createFlyoutPreferences ( Preferences prefs)
          This is a convenient method to get a default FlyoutPreferences object.
 void hookDropTargetListener ( GraphicalViewer viewer)
          This 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.
 void layout (boolean changed)
           
 void setExternalViewer ( PaletteViewer viewer)
          If an external palette viewer is provided, palette state (that is captured in PaletteViewer.saveState(IMemento) -- active tool, drawer expansion state, drawer pin state, etc.) will be maintained when switching between the two viewers.
 void setGraphicalControl (Control graphicalViewer)
          Sets the control along the side of which the palette is to be displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_COLLAPSED

public static final int STATE_COLLAPSED
One 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:
Constant Field Values

STATE_PINNED_OPEN

public static final int STATE_PINNED_OPEN
One 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:
Constant Field Values
Constructor Detail

FlyoutPaletteComposite

public 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 Detail

createFlyoutPreferences

public static 
FlyoutPaletteComposite.FlyoutPreferences createFlyoutPreferences(
Preferences prefs)
This is a convenient method to get a default FlyoutPreferences object. The returned FlyoutPreferences does not save any changes made to the given Preferences. It's upto the owner plugin to save the changes before it stops.

Parameters:
prefs - a plugin's Preferences
Returns:
a default implementation of FlyoutPreferences that stores the settings in the given Preferences
Since:
3.2

layout

public void layout(boolean changed)
See Also:
Composite#layout(boolean)

setExternalViewer

public void setExternalViewer(
PaletteViewer viewer)
If an external palette viewer is provided, palette state (that is captured in PaletteViewer.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

setGraphicalControl

public void setGraphicalControl(Control graphicalViewer)
Sets 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

hookDropTargetListener

public void hookDropTargetListener(
GraphicalViewer viewer)
This 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

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire