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
Answertopia.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.parts
Class GraphicalEditorWithPalette

java.lang.Object
  extended by

org.eclipse.gef.ui.parts.GraphicalEditor
      extended by
org.eclipse.gef.ui.parts.GraphicalEditorWithPalette

public abstract class GraphicalEditorWithPalette
extends GraphicalEditor

This class serves as a quick starting point for clients who are new to GEF. It will create an Editor containing a Split composite, with one side contianing a PaletteViewer, and the other a GraphicalViewer.


Constructor Summary
GraphicalEditorWithPalette ()
           
 
Method Summary
protected  void configurePaletteViewer ()
          Called to configure the viewer before it receives its contents.
protected  void createPaletteViewer (Composite parent)
          Creates the palette on the given composite.
 void createPartControl (Composite parent)
          Realizes the Editor by creating it's Control.
protected  int getInitialPaletteSize ()
          Returns the initial palette size in pixels.
protected abstract   PaletteRoot getPaletteRoot ()
          Returns the PaletteRoot for the palette viewer.
protected   PaletteViewer getPaletteViewer ()
          Returns the PaletteViewer.
protected  void handlePaletteResized (int newSize)
          Called whenever the user resizes the palette.
protected  void hookPaletteViewer ()
          Called when the palette viewer is set.
protected  void initializePaletteViewer ()
          Called to populate the palette viewer.
protected  void setEditDomain ( DefaultEditDomain ed)
          Sets the palette root of the edit domain
protected  void setPaletteViewer ( PaletteViewer paletteViewer)
          Sets the palette viewer
 
Methods inherited from class org.eclipse.gef.ui.parts. GraphicalEditor
commandStackChanged, configureGraphicalViewer, createActions, createGraphicalViewer, dispose, doSaveAs, firePropertyChange, getActionRegistry, getAdapter, getCommandStack, getEditDomain, getGraphicalViewer, getPropertyActions, getSelectionActions, getSelectionSynchronizer, getStackActions, hookGraphicalViewer, init, initializeActionRegistry, initializeGraphicalViewer, isDirty, isSaveAsAllowed, selectionChanged, setActionRegistry, setFocus, setGraphicalViewer, updateActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicalEditorWithPalette

public GraphicalEditorWithPalette()
Method Detail

configurePaletteViewer

protected void configurePaletteViewer()
Called to configure the viewer before it receives its contents.


createPaletteViewer

protected void createPaletteViewer(Composite parent)
Creates the palette on the given composite.

Parameters:
parent - the composite

createPartControl

public void createPartControl(Composite parent)
Description copied from class: GraphicalEditor
Realizes the Editor by creating it's Control.

WARNING: This method may or may not be called by the workbench prior to GraphicalEditor.dispose().

Overrides:
createPartControl in class GraphicalEditor
Parameters:
parent - the parent composite
See Also:
IWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)

getPaletteRoot

protected abstract 
PaletteRoot getPaletteRoot()
Returns the PaletteRoot for the palette viewer.

Returns:
the palette root

getInitialPaletteSize

protected int getInitialPaletteSize()
Returns the initial palette size in pixels. Subclasses may override this method to return a persisted value.

Returns:
the initial size of the palette in pixels.
See Also:
handlePaletteResized(int)

getPaletteViewer

protected 
PaletteViewer getPaletteViewer()
Returns the PaletteViewer.

Returns:
the palette viewer

handlePaletteResized

protected void handlePaletteResized(int newSize)
Called whenever the user resizes the palette.

Parameters:
newSize - the new size in pixels

hookPaletteViewer

protected void hookPaletteViewer()
Called when the palette viewer is set. By default, the EditDomain is given the palette viewer.


initializePaletteViewer

protected void initializePaletteViewer()
Called to populate the palette viewer.


setPaletteViewer

protected void setPaletteViewer(
PaletteViewer paletteViewer)
Sets the palette viewer

Parameters:
paletteViewer - the palette viewer

setEditDomain

protected void setEditDomain(
DefaultEditDomain ed)
Sets the palette root of the edit domain

Overrides:
setEditDomain in class GraphicalEditor
Parameters:
ed - the domain
See Also:
GraphicalEditor.setEditDomain(org.eclipse.gef.DefaultEditDomain)

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