public abstract class PaletteContainerFactory extends PaletteEntryFactory
PaletteContainers
This class does not create PaletteContainers within other
PaletteContainers. The necessary methods may be overridden
should such functionality be desired.
| Constructor and Description |
|---|
PaletteContainerFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreate(PaletteEntry selected)
You can always create a new container.
|
protected PaletteContainer |
determineContainerForNewEntry(PaletteEntry selected)
Given the current selection, this method determines the parent for the
new entry to be created.
|
protected int |
determineIndexForNewEntry(PaletteContainer parent,
PaletteEntry selected)
Calculates the index at which the new entry is to be created, given the
current selection.
|
createNewEntry, createNewEntry, determineTypeForNewEntry, getImageDescriptor, getLabel, setImageDescriptor, setLabelprotected PaletteContainer determineContainerForNewEntry(PaletteEntry selected)
PaletteEntryFactorySub-classes may override this method.
determineContainerForNewEntry in class PaletteEntryFactoryselected - The selected entryPaletteEntryFactory.determineContainerForNewEntry(PaletteEntry)protected int determineIndexForNewEntry(PaletteContainer parent, PaletteEntry selected)
PaletteEntryFactorySub-classes may override this method.
determineIndexForNewEntry in class PaletteEntryFactoryparent - The parent containerselected - The selected entryPaletteEntryFactory.determineIndexForNewEntry(PaletteContainer,
PaletteEntry)public boolean canCreate(PaletteEntry selected)
canCreate in class PaletteEntryFactoryselected - The selected PaletteEntry (Will never be
null)true if, given the current selection, this
PaletteEntryFactory can create a new
PaletteEntryPaletteEntryFactory.canCreate(PaletteEntry)Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.