public class PaletteContainer extends PaletteEntry
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List |
children
This container's contents
|
static java.lang.String |
PROPERTY_CHILDREN
Property name indicating that this PaletteContainer's children have
changed
|
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| Modifier | Constructor and Description |
|---|---|
protected |
PaletteContainer(java.lang.String label,
java.lang.String desc,
ImageDescriptor icon,
java.lang.Object type)
Constructor
Any parameter can be
null. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsType(java.lang.Object type)
Returns true if this type can be a child of this container.
|
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. |
void |
appendToSection(java.lang.String id,
PaletteEntry entry)
Appends the given entry after the entry with the given id, but before the
next separator.
|
java.util.List |
getChildren() |
boolean |
moveDown(PaletteEntry entry)
Moves the given entry down, if possible.
|
boolean |
moveUp(PaletteEntry entry)
Moves the given entry up, if possible.
|
void |
remove(PaletteEntry entry)
Removes the given PaletteEntry from this PaletteContainer
|
void |
setChildren(java.util.List list)
Sets the children of this PaletteContainer to the given list of
PaletteEntry objects. |
java.lang.String |
toString() |
addPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisiblepublic static final java.lang.String PROPERTY_CHILDREN
protected java.util.List children
protected PaletteContainer(java.lang.String label,
java.lang.String desc,
ImageDescriptor icon,
java.lang.Object type)
Any parameter can be null.
label - The container's namedesc - The container's descriptionicon - The small icon to represent this containertype - The container's typepublic boolean acceptsType(java.lang.Object type)
type - the type being requestedpublic void add(PaletteEntry entry)
entry - the PaletteEntry to addpublic void add(int index,
PaletteEntry entry)
index.index - position to add the PaletteEntryentry - the PaletteEntry to addpublic void addAll(java.util.List list)
PaletteEntry objects to this PaletteContainer.list - a list of PaletteEntry objects to add to this PaletteContainerpublic void appendToSection(java.lang.String id,
PaletteEntry entry)
id - the id of the entry to append afterentry - the entry to addpublic java.util.List getChildren()
public boolean moveDown(PaletteEntry entry)
entry - The entry to be movedtrue if the given entry was successfully moved downpublic boolean moveUp(PaletteEntry entry)
entry - The entry to be movedtrue if the given entry was successfully moved uppublic void remove(PaletteEntry entry)
entry - the PaletteEntry to removepublic void setChildren(java.util.List list)
PaletteEntry objects.list - the list of childrenpublic java.lang.String toString()
toString in class PaletteEntryObject.toString()Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.