public abstract class PaletteContainerFactory extends PaletteEntryFactory
PaletteContainer
s
This class does not create PaletteContainer
s 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, setLabel
protected PaletteContainer determineContainerForNewEntry(PaletteEntry selected)
PaletteEntryFactory
Sub-classes may override this method.
determineContainerForNewEntry
in class PaletteEntryFactory
selected
- The selected entryPaletteEntryFactory.determineContainerForNewEntry(PaletteEntry)
protected int determineIndexForNewEntry(PaletteContainer parent, PaletteEntry selected)
PaletteEntryFactory
Sub-classes may override this method.
determineIndexForNewEntry
in class PaletteEntryFactory
parent
- The parent containerselected
- The selected entryPaletteEntryFactory.determineIndexForNewEntry(PaletteContainer,
PaletteEntry)
public boolean canCreate(PaletteEntry selected)
canCreate
in class PaletteEntryFactory
selected
- The selected PaletteEntry
(Will never be
null
)true
if, given the current selection, this
PaletteEntryFactory
can create a new
PaletteEntry
PaletteEntryFactory.canCreate(PaletteEntry)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.