|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.palette.PaletteEntry
Root class (statically) for the palette model.
Field Summary | |
protected PropertyChangeSupport |
listeners
PropertyChangeSupport |
static String |
PALETTE_TYPE_UNKNOWN
Type unknown |
static int |
PERMISSION_FULL_MODIFICATION
All modifications allowed. |
static int |
PERMISSION_HIDE_ONLY
Entries with this permission level can only be hidden/shown. |
static int |
PERMISSION_LIMITED_MODIFICATION
Any property of entries with this level of permission can be changed; however, they cannot be deleted from the palette. |
static int |
PERMISSION_NO_MODIFICATION
No changes can be made to a PaletteEntry with this permission level. |
static String |
PROPERTY_DEFAULT
Property name for the entry's default staus |
static String |
PROPERTY_DESCRIPTION
Property name for the entry's description |
static String |
PROPERTY_LABEL
Property name for the entry's label (name) |
static String |
PROPERTY_LARGE_ICON
Property name for the entry's large icon |
static String |
PROPERTY_PARENT
Property name for the entry's parent |
static String |
PROPERTY_SMALL_ICON
Property name for the entry's small icon |
static String |
PROPERTY_TYPE
Property name for the entry's type |
static String |
PROPERTY_VISIBLE
Property name for the entry's hidden status |
Constructor Summary | |
PaletteEntry(String label,
String shortDescription)
Constructor Any parameter can be null
|
|
PaletteEntry(String label,
String shortDescription,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge)
Constructor Any parameter can be null
|
|
PaletteEntry(String label,
String shortDescription,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge,
Object type)
Constructor Any parameter can be null
|
|
PaletteEntry(String label,
String shortDescription,
Object type)
Constructor Any parameter can be null
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
A listener can only be added once. |
String |
getDescription()
|
String |
getLabel()
|
ImageDescriptor |
getLargeIcon()
|
PaletteContainer |
getParent()
|
ImageDescriptor |
getSmallIcon()
|
Object |
getType()
|
int |
getUserModificationPermission()
Returned values are from amongst the following: PERMISSION_NO_MODIFICATION PERMISSION_HIDE_ONLY PERMISSION_LIMITED_MODIFICATION PERMISSION_FULL_MODIFICATION * @return the permission level for this entry. |
boolean |
isVisible()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
setDescription(String s)
Mutator method for description |
void |
setLabel(String s)
Mutator method for label |
void |
setLargeIcon(ImageDescriptor icon)
Mutator method for large icon |
void |
setParent(PaletteContainer newParent)
Sets the parent of this entry |
void |
setSmallIcon(ImageDescriptor icon)
Mutator method for small icon |
void |
setType(Object newType)
Mutator method for type |
void |
setUserModificationPermission(int permission)
Permissions are not checked before making modifications. |
void |
setVisible(boolean newVal)
Makes this entry visible or invisible. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String PROPERTY_SMALL_ICON
public static final String PROPERTY_TYPE
public static final String PROPERTY_LARGE_ICON
public static final String PROPERTY_LABEL
public static final String PROPERTY_DESCRIPTION
public static final String PROPERTY_VISIBLE
public static final String PROPERTY_DEFAULT
public static final String PROPERTY_PARENT
public static final String PALETTE_TYPE_UNKNOWN
public static final int PERMISSION_NO_MODIFICATION
public static final int PERMISSION_HIDE_ONLY
public static final int PERMISSION_LIMITED_MODIFICATION
public static final int PERMISSION_FULL_MODIFICATION
protected PropertyChangeSupport listeners
Constructor Detail |
public PaletteEntry(String label, String shortDescription)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptionpublic PaletteEntry(String label, String shortDescription, Object type)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptiontype
- The entry's typepublic PaletteEntry(String label, String shortDescription, ImageDescriptor iconSmall, ImageDescriptor iconLarge)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptioniconSmall
- The small icon to represent this entryiconLarge
- The large icon to represent this entrypublic PaletteEntry(String label, String shortDescription, ImageDescriptor iconSmall, ImageDescriptor iconLarge, Object type)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptioniconSmall
- The small icon to represent this entryiconLarge
- The large icon to represent this entrytype
- The entry's typeMethod Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
public String getDescription()
public String getLabel()
public ImageDescriptor getLargeIcon()
public PaletteContainer getParent()
public ImageDescriptor getSmallIcon()
public Object getType()
public int getUserModificationPermission()
setUserModificationPermission(int)
public boolean isVisible()
public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeSupport.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void setDescription(String s)
s
- The new descriptionpublic void setLabel(String s)
s
- The new namepublic void setLargeIcon(ImageDescriptor icon)
icon
- The large icon to represent this entrypublic void setParent(PaletteContainer newParent)
newParent
- The parent PaletteContainerpublic void setUserModificationPermission(int permission)
PERMISSION_FULL_MODIFICATION
* @param permission One of the above-specified permission levels
public void setSmallIcon(ImageDescriptor icon)
icon
- The new small icon to represent this entrypublic void setType(Object newType)
newType
- The new typepublic void setVisible(boolean newVal)
newVal
- The new boolean indicating whether the entry is visible or notpublic String toString()
toString
in class Object
Object.toString()
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |