Class PaletteContainerFactory
java.lang.Object
org.eclipse.gef.ui.palette.customize.PaletteEntryFactory
org.eclipse.gef.ui.palette.customize.PaletteContainerFactory
- Direct Known Subclasses:
- PaletteDrawerFactory,- PaletteGroupFactory
Abstract factory for 
PaletteContainers
 
 This class does not create PaletteContainers within other
 PaletteContainers. The necessary methods may be overridden
 should such functionality be desired.
 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanCreate(PaletteEntry selected) You can always create a new container.protected PaletteContainerdetermineContainerForNewEntry(PaletteEntry selected) Given the current selection, this method determines the parent for the new entry to be created.protected intdetermineIndexForNewEntry(PaletteContainer parent, PaletteEntry selected) Calculates the index at which the new entry is to be created, given the current selection.Methods inherited from class org.eclipse.gef.ui.palette.customize.PaletteEntryFactorycreateNewEntry, createNewEntry, determineTypeForNewEntry, getImageDescriptor, getLabel, setImageDescriptor, setLabel
- 
Constructor Details- 
PaletteContainerFactorypublic PaletteContainerFactory()
 
- 
- 
Method Details- 
determineContainerForNewEntryDescription copied from class:PaletteEntryFactoryGiven the current selection, this method determines the parent for the new entry to be created.Sub-classes may override this method. - Overrides:
- determineContainerForNewEntryin class- PaletteEntryFactory
- Parameters:
- selected- The selected entry
- Returns:
- The parent of the new entry to be created
- See Also:
 
- 
determineIndexForNewEntryDescription copied from class:PaletteEntryFactoryCalculates the index at which the new entry is to be created, given the current selection.Sub-classes may override this method. - Overrides:
- determineIndexForNewEntryin class- PaletteEntryFactory
- Parameters:
- parent- The parent container
- selected- The selected entry
- Returns:
- the index at which the new entry should be added in the given container (-1 indicates add at the end)
- See Also:
 
- 
canCreateYou can always create a new container. So, this method always returns true.- Overrides:
- canCreatein class- PaletteEntryFactory
- Parameters:
- selected- The selected- PaletteEntry(Will never be- null)
- Returns:
- trueif, given the current selection, this- PaletteEntryFactorycan create a new- PaletteEntry
- See Also:
 
 
-