|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.palette.PaletteEntry
Root class (statically) for the palette model.
Field Summary | |
protected java.beans.PropertyChangeSupport |
listeners
PropertyChangeSupport |
static java.lang.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 java.lang.String |
PROPERTY_DEFAULT
Property name for the entry's default staus |
static java.lang.String |
PROPERTY_DESCRIPTION
Property name for the entry's description |
static java.lang.String |
PROPERTY_LABEL
Property name for the entry's label (name) |
static java.lang.String |
PROPERTY_LARGE_ICON
Property name for the entry's large icon |
static java.lang.String |
PROPERTY_PARENT
Property name for the entry's parent |
static java.lang.String |
PROPERTY_SMALL_ICON
Property name for the entry's small icon |
static java.lang.String |
PROPERTY_TYPE
Property name for the entry's type |
static java.lang.String |
PROPERTY_VISIBLE
Property name for the entry's hidden status |
Constructor Summary | |
PaletteEntry(java.lang.String label,
java.lang.String shortDescription)
Constructor |
|
PaletteEntry(java.lang.String label,
java.lang.String shortDescription,
org.eclipse.jface.resource.ImageDescriptor iconSmall,
org.eclipse.jface.resource.ImageDescriptor iconLarge)
Constructor |
|
PaletteEntry(java.lang.String label,
java.lang.String shortDescription,
org.eclipse.jface.resource.ImageDescriptor iconSmall,
org.eclipse.jface.resource.ImageDescriptor iconLarge,
java.lang.Object type)
Constructor |
|
PaletteEntry(java.lang.String label,
java.lang.String shortDescription,
org.eclipse.jface.resource.ImageDescriptor smallIcon,
org.eclipse.jface.resource.ImageDescriptor largeIcon,
java.lang.Object type,
java.lang.String id)
Constructor |
|
PaletteEntry(java.lang.String label,
java.lang.String shortDescription,
java.lang.Object type)
Constructor |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
A listener can only be added once. |
java.lang.String |
getDescription()
|
java.lang.String |
getId()
Returns the id. |
java.lang.String |
getLabel()
|
org.eclipse.jface.resource.ImageDescriptor |
getLargeIcon()
|
PaletteContainer |
getParent()
|
org.eclipse.jface.resource.ImageDescriptor |
getSmallIcon()
|
java.lang.Object |
getType()
|
int |
getUserModificationPermission()
Returned values are from amongst the following: PERMISSION_NO_MODIFICATION PERMISSION_HIDE_ONLY PERMISSION_LIMITED_MODIFICATION PERMISSION_FULL_MODIFICATION |
boolean |
isVisible()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
setDescription(java.lang.String s)
Mutator method for description |
void |
setId(java.lang.String id)
Sets the id. |
void |
setLabel(java.lang.String s)
Mutator method for label |
void |
setLargeIcon(org.eclipse.jface.resource.ImageDescriptor icon)
Mutator method for large icon |
void |
setParent(PaletteContainer newParent)
Sets the parent of this entry |
void |
setSmallIcon(org.eclipse.jface.resource.ImageDescriptor icon)
Mutator method for small icon |
void |
setType(java.lang.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. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_SMALL_ICON
public static final java.lang.String PROPERTY_TYPE
public static final java.lang.String PROPERTY_LARGE_ICON
public static final java.lang.String PROPERTY_LABEL
public static final java.lang.String PROPERTY_DESCRIPTION
public static final java.lang.String PROPERTY_VISIBLE
public static final java.lang.String PROPERTY_DEFAULT
public static final java.lang.String PROPERTY_PARENT
public static final java.lang.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 java.beans.PropertyChangeSupport listeners
Constructor Detail |
public PaletteEntry(java.lang.String label, java.lang.String shortDescription)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptionpublic PaletteEntry(java.lang.String label, java.lang.String shortDescription, java.lang.Object type)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptiontype
- The entry's typepublic PaletteEntry(java.lang.String label, java.lang.String shortDescription, org.eclipse.jface.resource.ImageDescriptor iconSmall, org.eclipse.jface.resource.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(java.lang.String label, java.lang.String shortDescription, org.eclipse.jface.resource.ImageDescriptor iconSmall, org.eclipse.jface.resource.ImageDescriptor iconLarge, java.lang.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 typepublic PaletteEntry(java.lang.String label, java.lang.String shortDescription, org.eclipse.jface.resource.ImageDescriptor smallIcon, org.eclipse.jface.resource.ImageDescriptor largeIcon, java.lang.Object type, java.lang.String id)
Any parameter can be null
label
- The entry's nameshortDescription
- The entry's descriptionsmallIcon
- The small icon to represent this entrylargeIcon
- The large icon to represent this entrytype
- The entry's typeid
- The entry's id (preferrably unique)Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener that is to be notified of changesPropertyChangeSupport.addPropertyChangeListener(
java.beans.PropertyChangeListener)
public java.lang.String getDescription()
public java.lang.String getId()
null
), an empty String
will be returned.
public java.lang.String getLabel()
public org.eclipse.jface.resource.ImageDescriptor getLargeIcon()
public PaletteContainer getParent()
public org.eclipse.jface.resource.ImageDescriptor getSmallIcon()
public java.lang.Object getType()
public int getUserModificationPermission()
setUserModificationPermission(int)
public boolean isVisible()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener that is not to be notified anymorePropertyChangeSupport.removePropertyChangeListener(
java.beans.PropertyChangeListener)
public void setDescription(java.lang.String s)
s
- The new descriptionpublic void setId(java.lang.String id)
null
.
id
- The new id to be setpublic void setLabel(java.lang.String s)
s
- The new namepublic void setLargeIcon(org.eclipse.jface.resource.ImageDescriptor icon)
icon
- The large icon to represent this entrypublic void setParent(PaletteContainer newParent)
newParent
- The parent PaletteContainerpublic void setSmallIcon(org.eclipse.jface.resource.ImageDescriptor icon)
icon
- The new small icon to represent this entrypublic void setType(java.lang.Object newType)
newType
- The new typepublic void setUserModificationPermission(int permission)
PERMISSION_FULL_MODIFICATION
permission
- One of the above-specified permission levelspublic void setVisible(boolean newVal)
newVal
- The new boolean indicating whether the entry is visible or notpublic java.lang.String toString()
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |