|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.alchemist.configbuilder.ConfigElement
public abstract class ConfigElement
This is the abstract ConfigElement.
Implementations are used in ConfigBuilderPanel,
both JLists are filled with ConfigElements.
The list of ConfigElements is representing
a sequence of actions in the output xml
ConfigElement acts like a model, where the
corresponding ConfigElementEditor is the editor.
| Field Summary | |
|---|---|
static java.awt.datatransfer.DataFlavor |
FLAVOR
object data flavor |
static java.lang.String |
PROPERTY_KEY_DEFAULTICON
property key for default icon attribute |
static java.lang.String |
PROPERTY_KEY_DISABLEDICON
property key for disabled icon attribute |
static java.lang.String |
PROPERTY_KEY_EDITABLE
property key for editable state |
static java.lang.String |
PROPERTY_KEY_HELPTEXT
property key for helptext attribute |
static java.lang.String |
PROPERTY_KEY_ICON
property key for icon attribute |
static java.lang.String |
PROPERTY_KEY_ID
property key for id attribute |
static java.lang.String |
PROPERTY_KEY_NAME
property key for name attribute |
static java.lang.String |
PROPERTY_KEY_TOOLTIP
property key for tooltip attribute |
static java.lang.String |
PROPERTY_KEY_VALID
property key for valid state |
| Constructor Summary | |
|---|---|
ConfigElement()
Constructs a config element. |
|
ConfigElement(java.lang.String id)
Constructs a config element with the specified id |
|
ConfigElement(java.lang.String id,
java.lang.String name)
Constructs a config element with the specified id and name |
|
ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon)
Constructs a config element with the specified id, name and icon |
|
ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
javax.swing.ImageIcon disabledIcon,
java.lang.String tooltip,
java.lang.String helpText)
Constructs a config element with the specified id, name, icon, disabled icon and tooltip |
|
ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
java.lang.String tooltip)
Constructs a config element with the specified id, name, icon and tooltip |
|
ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
java.lang.String tooltip,
java.lang.String helpText)
Constructs a config element with the specified id, name, icon and tooltip |
|
| Method Summary | |
|---|---|
void |
addGroup(java.lang.String groupName)
Sets this element as a member of given group |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
void |
addTag(java.lang.String tag)
Adds a tag for this element |
ConfigElement |
clone()
|
ConfigElement |
cloneElement()
Deprecated. use clone()
Returns a clone of the element, or null if clone not supported |
javax.swing.Icon |
getDefaultIcon()
Returns the default icon of the element |
javax.swing.ImageIcon |
getDisabledIcon()
Returns the disabled icon of the element (or null if not set) |
java.lang.String[] |
getGroups()
Returns the group names this element is a member of |
java.lang.String |
getHelpText()
Returns the help text of the element |
javax.swing.Icon |
getIcon()
Returns the icon of the element, or the warning icon if element is at invalid state |
java.lang.String |
getId()
Returns the id of the element |
java.lang.String |
getLicenseName()
Returns the name of required license, or null |
java.lang.String |
getName()
Returns the name of the element |
javax.swing.event.SwingPropertyChangeSupport |
getPropertyChangeSupport()
Returns the propertyChangeSupport |
java.lang.String[] |
getTags()
Returns the tags of this element |
java.lang.String |
getTooltip()
Returns the tooltip of the element |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
|
boolean |
hasGroup(java.lang.String groupName)
Returns true if element is in group |
boolean |
hasGroups()
Returns true if element has any groups |
boolean |
hasTag(java.lang.String tag)
Returns true if element has the tag |
boolean |
hasTags()
Returns true if element has any tags |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
|
abstract boolean |
isDefault()
Returns if config element is at default state |
boolean |
isEditable()
Returns if config element is editable |
boolean |
isLicensed()
Returns true if the action represented
by this element with current license settings can be used |
boolean |
isValid()
Returns the current validity state |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setDefaultIcon(javax.swing.Icon icon)
Sets the icon of the element |
void |
setDisabledIcon(javax.swing.ImageIcon disabledIcon)
Sets the disabled icon |
void |
setEditable(boolean editable)
Sets if config element is editable |
void |
setHelpText(java.lang.String helpText)
Sets the help text of the element |
void |
setId(java.lang.String id)
Sets the id of the element |
void |
setLicensed(boolean licensed)
Sets if the action represented by this element with current license settings can be used |
void |
setLicenseName(java.lang.String licenseName)
Sets the license name required for this element |
void |
setName(java.lang.String name)
Sets the name of the element |
void |
setPropertyChangeSupport(javax.swing.event.SwingPropertyChangeSupport propertyChangeSupport)
Sets the propertyChangeSupport |
void |
setTooltip(java.lang.String tooltip)
Sets the tooltip of the element |
protected void |
setValid(boolean valid)
Sets the validity state Property change event for PROPERTY_KEY_VALID |
void |
store(org.dom4j.Element parent)
This method adds the xml representation of ConfigElement to the parent element |
protected org.dom4j.Element |
store(org.dom4j.Element parent,
java.lang.String xmlTag)
This method adds the xml representation of ConfigElement to the parent element with the specified name |
protected abstract void |
validate()
This method should be called after modifications occured in model. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.datatransfer.DataFlavor FLAVOR
public static final java.lang.String PROPERTY_KEY_VALID
public static final java.lang.String PROPERTY_KEY_EDITABLE
public static final java.lang.String PROPERTY_KEY_ID
public static final java.lang.String PROPERTY_KEY_NAME
public static final java.lang.String PROPERTY_KEY_ICON
public static final java.lang.String PROPERTY_KEY_DISABLEDICON
public static final java.lang.String PROPERTY_KEY_DEFAULTICON
public static final java.lang.String PROPERTY_KEY_TOOLTIP
public static final java.lang.String PROPERTY_KEY_HELPTEXT
| Constructor Detail |
|---|
public ConfigElement()
public ConfigElement(java.lang.String id)
id - is the element id
public ConfigElement(java.lang.String id,
java.lang.String name)
id - is the element idname - is the name of the element
public ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon)
id - is the element idname - is the name of the elementicon - is the icon of the element
public ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
java.lang.String tooltip)
id - is the element idname - is the name of the elementicon - is the icon of the elementtooltip - is the tooltip of the element
public ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
java.lang.String tooltip,
java.lang.String helpText)
id - is the element idname - is the name of the elementicon - is the icon of the elementtooltip - is the tooltip of the elementhelpText - is the detailed help text of the element
public ConfigElement(java.lang.String id,
java.lang.String name,
javax.swing.Icon icon,
javax.swing.ImageIcon disabledIcon,
java.lang.String tooltip,
java.lang.String helpText)
id - is the element idname - is the name of the elementicon - is the icon of the elementdisabledIcon - is the disabled icon of the elementtooltip - is the tooltip of the elementhelpText - is the detailed help text of the element| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - is the new namepublic javax.swing.Icon getIcon()
public javax.swing.ImageIcon getDisabledIcon()
public void setDisabledIcon(javax.swing.ImageIcon disabledIcon)
disabledIcon - is the new disabled iconpublic void setDefaultIcon(javax.swing.Icon icon)
icon - is the new iconpublic javax.swing.Icon getDefaultIcon()
getIcon()public java.lang.String getTooltip()
public void setTooltip(java.lang.String tooltip)
tooltip - is the new tooltippublic java.lang.String getId()
public void setId(java.lang.String id)
id - is the new idpublic java.lang.String getHelpText()
public void setHelpText(java.lang.String helpText)
helpText - is the new helptextpublic boolean isEditable()
public void setEditable(boolean editable)
editable - is the new value
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
getTransferData in interface java.awt.datatransfer.Transferablejava.awt.datatransfer.UnsupportedFlavorException
java.io.IOExceptionpublic java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface java.awt.datatransfer.Transferablepublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported in interface java.awt.datatransfer.Transferablepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to be added
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The name of the property to listen onlistener - The PropertyChangeListener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to be removed
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The name of the property that was listened onlistener - The PropertyChangeListener to be removedpublic boolean isValid()
protected void setValid(boolean valid)
PROPERTY_KEY_VALID property will be fired
if necessary.
- Parameters:
valid - is the new validity state
protected abstract void validate()
setValid(boolean)
public void store(org.dom4j.Element parent)
parent - is the parent element of this tag
protected org.dom4j.Element store(org.dom4j.Element parent,
java.lang.String xmlTag)
parent - is the parent elementxmlTag - is the name which is used to add this element
public abstract boolean isDefault()
public void addGroup(java.lang.String groupName)
groupName - is the name of the grouppublic java.lang.String[] getGroups()
public boolean hasGroup(java.lang.String groupName)
true if element is in group
groupName - is the name of the group
true if element is in grouppublic boolean hasGroups()
true if element has any groups
true if element has any groupspublic void addTag(java.lang.String tag)
tag - is the tag to setpublic java.lang.String[] getTags()
public boolean hasTag(java.lang.String tag)
true if element has the tag
tag - is the tag being checked
true if element has the tagpublic boolean hasTags()
true if element has any tags
true if element has any tagspublic boolean isLicensed()
true if the action represented
by this element with current license settings can be used
true if license is available, or not needed at all.public void setLicensed(boolean licensed)
licensed - is the new valuepublic java.lang.String getLicenseName()
null
nullpublic void setLicenseName(java.lang.String licenseName)
licenseName - the name of the specific license@Deprecated public ConfigElement cloneElement()
clone()
Returns a clone of the element, or null if clone not supported
null if clone not supportedpublic void setPropertyChangeSupport(javax.swing.event.SwingPropertyChangeSupport propertyChangeSupport)
propertyChangeSupport - the propertyChangeSupport to setpublic javax.swing.event.SwingPropertyChangeSupport getPropertyChangeSupport()
public ConfigElement clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||