public class PaletteStack extends PaletteContainer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PALETTE_TYPE_STACK
Type identifier
|
static java.lang.String |
PROPERTY_ACTIVE_ENTRY
Property name for the active entry
|
children, PROPERTY_CHILDREN
listeners, 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 and Description |
---|
PaletteStack(java.lang.String name,
java.lang.String desc,
ImageDescriptor icon)
Creates a new PaletteStack with the given name, description, and icon.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsType(java.lang.Object type)
Returns true if this type can be a child of this container Only accepts
ToolEntry's.
|
void |
add(int index,
PaletteEntry entry)
Adds the given PaletteEntry at position
index . |
void |
add(PaletteEntry entry)
Adds the given entry to the end of this PaletteContainer
|
void |
addAll(java.util.List list)
Adds the list of
PaletteEntry objects to this PaletteContainer. |
PaletteEntry |
getActiveEntry()
Returns the PaletteEntry referring to the active entry that should be
shown in the palette.
|
void |
remove(PaletteEntry entry)
Removes the given PaletteEntry from this PaletteContainer
|
void |
setActiveEntry(PaletteEntry entry)
Sets the "active" child entry to the given PaletteEntry.
|
void |
setChildren(java.util.List list)
Sets the children of this PaletteContainer to the given list of
PaletteEntry objects. |
appendToSection, getChildren, moveDown, moveUp, toString
addPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisible
public static final java.lang.String PALETTE_TYPE_STACK
public static final java.lang.String PROPERTY_ACTIVE_ENTRY
public PaletteStack(java.lang.String name, java.lang.String desc, ImageDescriptor icon)
null
.name
- the stack's namedesc
- the stack's descriptionicon
- an ImageDescriptor for the stack's small iconPaletteContainer.PaletteContainer(String, String, ImageDescriptor,
Object)
public boolean acceptsType(java.lang.Object type)
acceptsType
in class PaletteContainer
type
- the type being requestedpublic void add(int index, PaletteEntry entry)
PaletteContainer
index
.add
in class PaletteContainer
index
- position to add the PaletteEntryentry
- the PaletteEntry to addPaletteContainer.add(int,
org.eclipse.gef.palette.PaletteEntry)
public void addAll(java.util.List list)
PaletteContainer
PaletteEntry
objects to this PaletteContainer.addAll
in class PaletteContainer
list
- a list of PaletteEntry objects to add to this PaletteContainerPaletteContainer.addAll(java.util.List)
public PaletteEntry getActiveEntry()
public void remove(PaletteEntry entry)
PaletteContainer
remove
in class PaletteContainer
entry
- the PaletteEntry to removePaletteContainer.remove(org.eclipse.gef.palette.PaletteEntry)
public void setActiveEntry(PaletteEntry entry)
entry
- the entry to show on the palette.public void add(PaletteEntry entry)
PaletteContainer
add
in class PaletteContainer
entry
- the PaletteEntry to addpublic void setChildren(java.util.List list)
PaletteContainer
PaletteEntry
objects.setChildren
in class PaletteContainer
list
- the list of childrenCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.