de.tu_berlin.cs.tfs.muvitorkit.gef.palette
Class MuvitorPaletteRoot

java.lang.Object
  extended by org.eclipse.gef.palette.PaletteEntry
      extended by org.eclipse.gef.palette.PaletteContainer
          extended by org.eclipse.gef.palette.PaletteRoot
              extended by de.tu_berlin.cs.tfs.muvitorkit.gef.palette.MuvitorPaletteRoot

public class MuvitorPaletteRoot
extends PaletteRoot

A default palette root that can be used in graphical views. It features a flexible convenient method to add new tool entries to palette groups.

Rating red

Field Summary
protected  PaletteGroup defaultPaletteGroup
           
 
Fields inherited from class org.eclipse.gef.palette.PaletteRoot
PALETTE_TYPE_ROOT
 
Fields inherited from class org.eclipse.gef.palette.PaletteContainer
children, PROPERTY_CHILDREN
 
Fields inherited from class org.eclipse.gef.palette.PaletteEntry
listeners, PALETTE_TYPE_UNKNOWN, PERMISSION_FULL_MODIFICATION, PERMISSION_HIDE_ONLY, PERMISSION_LIMITED_MODIFICATION, PERMISSION_NO_MODIFICATION, PROPERTY_DEFAULT, PROPERTY_DESCRIPTION, PROPERTY_LABEL, PROPERTY_LARGE_ICON, PROPERTY_PARENT, PROPERTY_SMALL_ICON, PROPERTY_TYPE, PROPERTY_VISIBLE
 
Constructor Summary
MuvitorPaletteRoot()
           
 
Method Summary
protected  ToolEntry addToolEntry(PaletteGroup group, String label, String description, CreationFactory factory, ImageDescriptor iconSmall, ImageDescriptor iconLarge, Class<? extends TargetingTool> creationToolClass)
          A convenience method for simply creating tool entries to a palette group.
 
Methods inherited from class org.eclipse.gef.palette.PaletteRoot
acceptsType, getDefaultEntry, setDefaultEntry, toString
 
Methods inherited from class org.eclipse.gef.palette.PaletteContainer
add, add, addAll, appendToSection, getChildren, moveDown, moveUp, remove, setChildren
 
Methods inherited from class org.eclipse.gef.palette.PaletteEntry
addPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultPaletteGroup

protected final PaletteGroup defaultPaletteGroup
Constructor Detail

MuvitorPaletteRoot

public MuvitorPaletteRoot()
Method Detail

addToolEntry

protected ToolEntry addToolEntry(PaletteGroup group,
                                 String label,
                                 String description,
                                 CreationFactory factory,
                                 ImageDescriptor iconSmall,
                                 ImageDescriptor iconLarge,
                                 Class<? extends TargetingTool> creationToolClass)
A convenience method for simply creating tool entries to a palette group. With this you may specify a tool class different to the GEF standard CreationTool.class, e.g. if you want to override its command execution behavior to let the tool show some dialogs before creating or executing a command.

Parameters:
group - the palette group the tool entry will be added to
label - the label of the new tool entry
description - the description of the new tool entry
factory - the creation factory the tool entry will use
iconSmall - a small icon for the tool entry
iconLarge - a large icon for the tool entry
creationToolClass - the class of the creation tool
Returns:
the newly added tool entry for further custom modifications