Class PaletteStackFactory
java.lang.Object
org.eclipse.gef.ui.palette.customize.PaletteEntryFactory
org.eclipse.gef.ui.palette.customize.PaletteStackFactory
Factory to create
PaletteStack- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PaletteStackFactory with label PaletteMessages.MODEL_TYPE_STACK -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreate(PaletteEntry selected) This method is called by thePaletteCustomizerDialogto determine whether to enable or disable this action on the toolbar and the context menu.protected PaletteEntrycreateNewEntry(Shell shell) Create the PaletteEntrycreateNewEntry(Shell shell, PaletteEntry selected) This method is called when a new palette entry of the type supported by thisPaletteEntryFactoryis to be created.protected ObjectdetermineTypeForNewEntry(PaletteEntry selected) Given the current selection, this method determines the type of the new entry to be created.Methods inherited from class org.eclipse.gef.ui.palette.customize.PaletteEntryFactory
determineContainerForNewEntry, determineIndexForNewEntry, getImageDescriptor, getLabel, setImageDescriptor, setLabel
-
Constructor Details
-
PaletteStackFactory
public PaletteStackFactory()Creates a new PaletteStackFactory with label PaletteMessages.MODEL_TYPE_STACK
-
-
Method Details
-
canCreate
Description copied from class:PaletteEntryFactoryThis method is called by thePaletteCustomizerDialogto determine whether to enable or disable this action on the toolbar and the context menu.This default implementation allows the creation of a new entry only in
PaletteContainers with the following user permission:PERMISSION_FULL_MODIFICATION- Overrides:
canCreatein classPaletteEntryFactory- Parameters:
selected- The selectedPaletteEntry(Will never benull)- Returns:
trueif, given the current selection, thisPaletteEntryFactorycan create a newPaletteEntry- See Also:
-
createNewEntry
Description copied from class:PaletteEntryFactoryCreate the PaletteEntry- Specified by:
createNewEntryin classPaletteEntryFactory- Parameters:
shell- TheShellof thePaletteCustomizerDialog; it can be used to create another warning or information dialog.- Returns:
- The newly created entry
- See Also:
-
createNewEntry
Description copied from class:PaletteEntryFactoryThis method is called when a new palette entry of the type supported by thisPaletteEntryFactoryis to be created.- Overrides:
createNewEntryin classPaletteEntryFactory- Parameters:
shell- TheShellof thePaletteCustomizerDialogselected- ThePaletteEntrythat was selected in the outline when this action was launched. Will never benull.- Returns:
- PaletteEntry The newly created
PaletteEntry - See Also:
-
determineTypeForNewEntry
Description copied from class:PaletteEntryFactoryGiven the current selection, this method determines the type of the new entry to be created.Sub-classes may override this method.
- Overrides:
determineTypeForNewEntryin classPaletteEntryFactory- Parameters:
selected- The selected entry- Returns:
- The type of the new entry to be created
- See Also:
-