Package org.eclipse.gef.palette
Class PaletteStack
java.lang.Object
org.eclipse.gef.palette.PaletteEntry
org.eclipse.gef.palette.PaletteContainer
org.eclipse.gef.palette.PaletteStack
The model object for a PaletteStack - A stack of tools. A stack should
 contain only tools and should have permissions that are less than or equal to
 its parent.
- Since:
- 3.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringType identifierstatic final StringProperty name for the active entryFields inherited from class org.eclipse.gef.palette.PaletteContainerchildren, PROPERTY_CHILDRENFields inherited from class org.eclipse.gef.palette.PaletteEntrylisteners, 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 SummaryConstructorsConstructorDescriptionPaletteStack(String name, String desc, ImageDescriptor icon) Creates a new PaletteStack with the given name, description, and icon.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanacceptsType(Object type) Returns true if this type can be a child of this container Only accepts ToolEntry's.voidadd(int index, PaletteEntry entry) Adds the given PaletteEntry at positionindex.voidadd(PaletteEntry entry) Adds the given entry to the end of this PaletteContainervoidaddAll(List<? extends PaletteEntry> list) Adds the list ofPaletteEntryobjects to this PaletteContainer.Returns the PaletteEntry referring to the active entry that should be shown in the palette.voidremove(PaletteEntry entry) Removes the given PaletteEntry from this PaletteContainervoidsetActiveEntry(PaletteEntry entry) Sets the "active" child entry to the given PaletteEntry.voidsetChildren(List<PaletteEntry> list) Sets the children of this PaletteContainer to the given list ofPaletteEntryobjects.Methods inherited from class org.eclipse.gef.palette.PaletteContainerappendToSection, getChildren, moveDown, moveUp, toStringMethods inherited from class org.eclipse.gef.palette.PaletteEntryaddPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisible
- 
Field Details- 
PALETTE_TYPE_STACKType identifier- See Also:
 
- 
PROPERTY_ACTIVE_ENTRYProperty name for the active entry- See Also:
 
 
- 
- 
Constructor Details- 
PaletteStackCreates a new PaletteStack with the given name, description, and icon. These will be shown only in the customize menu. Any of the given parameter can benull.- Parameters:
- name- the stack's name
- desc- the stack's description
- icon- an ImageDescriptor for the stack's small icon
- See Also:
 
 
- 
- 
Method Details- 
acceptsTypeReturns true if this type can be a child of this container Only accepts ToolEntry's.- Overrides:
- acceptsTypein class- PaletteContainer
- Parameters:
- type- the type being requested
- Returns:
- true if this can be a child of this container
 
- 
addDescription copied from class:PaletteContainerAdds the given PaletteEntry at positionindex.- Overrides:
- addin class- PaletteContainer
- Parameters:
- index- position to add the PaletteEntry
- entry- the PaletteEntry to add
- See Also:
 
- 
addAllDescription copied from class:PaletteContainerAdds the list ofPaletteEntryobjects to this PaletteContainer.- Overrides:
- addAllin class- PaletteContainer
- Parameters:
- list- a list of PaletteEntry objects to add to this PaletteContainer
- See Also:
 
- 
getActiveEntryReturns the PaletteEntry referring to the active entry that should be shown in the palette.- Returns:
- active entry to be shown in the palette.
 
- 
removeDescription copied from class:PaletteContainerRemoves the given PaletteEntry from this PaletteContainer- Overrides:
- removein class- PaletteContainer
- Parameters:
- entry- the PaletteEntry to remove
- See Also:
 
- 
setActiveEntrySets the "active" child entry to the given PaletteEntry. This entry will be shown on the palette and will be checked in the menu.- Parameters:
- entry- the entry to show on the palette.
 
- 
addDescription copied from class:PaletteContainerAdds the given entry to the end of this PaletteContainer- Overrides:
- addin class- PaletteContainer
- Parameters:
- entry- the PaletteEntry to add
 
- 
setChildrenDescription copied from class:PaletteContainerSets the children of this PaletteContainer to the given list ofPaletteEntryobjects.- Overrides:
- setChildrenin class- PaletteContainer
- Parameters:
- list- the list of children
 
 
-