public class PaletteDrawer extends PaletteContainer
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_STATE_CLOSED
Constants indicating the possible initial states for a drawer:
INITIAL_STATE_OPEN - The drawer is expanded when the palette is
created.
|
static int |
INITIAL_STATE_OPEN
Constants indicating the possible initial states for a drawer:
INITIAL_STATE_OPEN - The drawer is expanded when the palette is
created.
|
static int |
INITIAL_STATE_PINNED_OPEN
Constants indicating the possible initial states for a drawer:
INITIAL_STATE_OPEN - The drawer is expanded when the palette is
created.
|
static int |
INITIAL_STATUS_PINNED_OPEN
Deprecated.
|
static java.lang.Object |
PALETTE_TYPE_DRAWER
The type for this PaletteEntry.
|
static java.lang.String |
PROPERTY_INITIAL_STATUS
Property name used when notification about a change in the drawer's
initial state is fired.
|
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 |
---|
PaletteDrawer(java.lang.String label)
Constructor
|
PaletteDrawer(java.lang.String label,
ImageDescriptor icon)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsType(java.lang.Object type)
Returns true if this type can be a child of this container
|
java.lang.Object |
getDrawerType() |
int |
getInitialState() |
boolean |
isInitiallyOpen() |
boolean |
isInitiallyPinned() |
void |
setDrawerType(java.lang.Object obj)
DrawerType indicates whether a drawer will contain ToolEntries of
PaletteTemplateEntries.
|
void |
setInitialState(int state)
Sets the initial state of this drawer (i.e. the state that this drawer
should be when the palette is created).
|
void |
setShowDefaultIcon(boolean showDefaultIcon)
Should the default icon be shown for this drawer if no icon is set?
|
boolean |
showDefaultIcon()
Should the default icon be shown for this drawer if no icon is set?
|
add, add, addAll, appendToSection, getChildren, moveDown, moveUp, remove, setChildren, 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.Object PALETTE_TYPE_DRAWER
PaletteEntry.getType()
public static final java.lang.String PROPERTY_INITIAL_STATUS
public static final int INITIAL_STATE_OPEN
public static final int INITIAL_STATE_CLOSED
public static final int INITIAL_STATE_PINNED_OPEN
public static final int INITIAL_STATUS_PINNED_OPEN
INITIAL_STATE_PINNED_OPEN
public PaletteDrawer(java.lang.String label)
label
- The name/label for this entrypublic PaletteDrawer(java.lang.String label, ImageDescriptor icon)
label
- The name/label for this entryicon
- An icon for this drawerpublic boolean acceptsType(java.lang.Object type)
acceptsType
in class PaletteContainer
type
- the type being requestedpublic java.lang.Object getDrawerType()
ToolEntry.PALETTE_TYPE_TOOL
or
PaletteTemplateEntry.PALETTE_TYPE_TEMPLATE
or (if
the drawer is empty and a drawerType has not been explicitly set)
PALETTE_TYPE_UNKNOWN
setDrawerType(Object)
public int getInitialState()
public boolean isInitiallyOpen()
true
if open initiallypublic boolean isInitiallyPinned()
true
if the drawer is to be pinned open initially.public void setDrawerType(java.lang.Object obj)
obj
- ToolEntry.PALETTE_TYPE_TOOL
or
PaletteTemplateEntry.PALETTE_TYPE_TEMPLATE
public void setInitialState(int state)
state
- INITIAL_STATE_OPEN or INITIAL_STATE_CLOSED or
INITIAL_STATE_PINNED_OPENpublic boolean showDefaultIcon()
public void setShowDefaultIcon(boolean showDefaultIcon)
showDefaultIcon
- true if the default icon should be shown if no icon is set;
false otherwiseCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.