Package org.eclipse.gef.palette
Class PaletteContainer
java.lang.Object
org.eclipse.gef.palette.PaletteEntry
org.eclipse.gef.palette.PaletteContainer
- Direct Known Subclasses:
- PaletteDrawer,- PaletteGroup,- PaletteRoot,- PaletteStack,- PaletteToolbar
Default implementation of PaletteContainer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<PaletteEntry> This container's contentsstatic final StringProperty name indicating that this PaletteContainer's children have changedFields 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 SummaryConstructorsModifierConstructorDescriptionprotectedPaletteContainer(String label, String desc, ImageDescriptor icon, Object type) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionbooleanacceptsType(Object type) Returns true if this type can be a child of this container.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.voidappendToSection(String id, PaletteEntry entry) Appends the given entry after the entry with the given id, but before the next separator.List<? extends PaletteEntry> booleanmoveDown(PaletteEntry entry) Moves the given entry down, if possible.booleanmoveUp(PaletteEntry entry) Moves the given entry up, if possible.voidremove(PaletteEntry entry) Removes the given PaletteEntry from this PaletteContainervoidsetChildren(List<PaletteEntry> list) Sets the children of this PaletteContainer to the given list ofPaletteEntryobjects.toString()Methods 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- 
PROPERTY_CHILDRENProperty name indicating that this PaletteContainer's children have changed- See Also:
 
- 
childrenThis container's contents
 
- 
- 
Constructor Details- 
PaletteContainerConstructorAny parameter can be null.- Parameters:
- label- The container's name
- desc- The container's description
- icon- The small icon to represent this container
- type- The container's type
 
 
- 
- 
Method Details- 
acceptsTypeReturns true if this type can be a child of this container.- Parameters:
- type- the type being requested
- Returns:
- true if this can be a child of this container
 
- 
addAdds the given entry to the end of this PaletteContainer- Parameters:
- entry- the PaletteEntry to add
 
- 
addAdds the given PaletteEntry at positionindex.- Parameters:
- index- position to add the PaletteEntry
- entry- the PaletteEntry to add
 
- 
addAllAdds the list ofPaletteEntryobjects to this PaletteContainer.- Parameters:
- list- a list of PaletteEntry objects to add to this PaletteContainer
 
- 
appendToSectionAppends the given entry after the entry with the given id, but before the next separator.- Parameters:
- id- the id of the entry to append after
- entry- the entry to add
 
- 
getChildren- Returns:
- the children of this container
 
- 
moveDownMoves the given entry down, if possible. This method only handles moving the child within this container.- Parameters:
- entry- The entry to be moved
- Returns:
- trueif the given entry was successfully moved down
 
- 
moveUpMoves the given entry up, if possible. This method only handles moving the child within this container.- Parameters:
- entry- The entry to be moved
- Returns:
- trueif the given entry was successfully moved up
 
- 
removeRemoves the given PaletteEntry from this PaletteContainer- Parameters:
- entry- the PaletteEntry to remove
 
- 
setChildrenSets the children of this PaletteContainer to the given list ofPaletteEntryobjects.- Parameters:
- list- the list of children
 
- 
toString- Overrides:
- toStringin class- PaletteEntry
- See Also:
 
 
-