|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jbbres.lib.actions.tools.elements.SimpleElementDescription<T>
public class SimpleElementDescription<T extends Element>
Provides information regarding the element, such as its name, a short description, its version number etc.
Field Summary |
---|
Fields inherited from interface com.jbbres.lib.actions.elements.ElementDescription |
---|
CATEGORY_SEPARATOR, DESCRIPTION_CATEGORIES, DESCRIPTION_COMPANY_NAME, DESCRIPTION_COMPANY_SUPPORT, DESCRIPTION_COMPANY_WEBSITE, DESCRIPTION_COPYRIGHT, DESCRIPTION_ICON, DESCRIPTION_SUMMARY, DESCRIPTION_TITLE, DESCRIPTION_VERSION, TYPE |
Constructor Summary | |
---|---|
SimpleElementDescription()
Instantiates a new simple element description. |
|
SimpleElementDescription(java.lang.String title)
Instantiates a new simple element description. |
|
SimpleElementDescription(java.lang.String title,
javax.swing.ImageIcon icon)
Instantiates a new simple element description. |
Method Summary | |
---|---|
void |
addElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
Adds a element description change listener. |
void |
addToCategory(Category c)
Adds the element into the given category. |
int |
compareTo(ElementDescription<?> properties)
|
void |
fireElementDescriptionChanges(java.lang.String key,
java.lang.String oldValue)
Calls the elementDescriptionChange(ElementDescriptionChangeEvent) of
all the listeners. |
Category[] |
getCategories()
Returns the categories associated to the element. |
java.lang.String |
getDescription(java.lang.String key)
Returns the information associated to the given key. |
javax.swing.ImageIcon |
getIcon()
Returns the icon associated to the element. |
java.lang.Object |
getSearchableValue(com.jbbres.lib.search.SearchField<?> field)
|
Element |
newElementInstance(Workflow workflow)
Creates and returns a new instance of the element described. |
void |
removeCategory(Category c)
Removes the element into from the given category. |
void |
removeElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
Removes a element description change listener. |
void |
setDescription(java.lang.String key,
java.lang.String value)
Sets a description value. |
void |
setIcon(javax.swing.ImageIcon icon)
Sets the element icon. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleElementDescription()
public SimpleElementDescription(java.lang.String title)
title
- - the element titlepublic SimpleElementDescription(java.lang.String title, javax.swing.ImageIcon icon)
title
- - the element titleicon
- - the element iconMethod Detail |
---|
public Category[] getCategories()
ElementDescription
getCategories
in interface ElementDescription<T extends Element>
public void addToCategory(Category c)
c
- - the categorypublic void removeCategory(Category c)
c
- - the categorypublic java.lang.String getDescription(java.lang.String key)
ElementDescription
getDescription
in interface ElementDescription<T extends Element>
key
- - the key
public void setDescription(java.lang.String key, java.lang.String value)
key
- - the description keyvalue
- - the description valuepublic javax.swing.ImageIcon getIcon()
ElementDescription
getIcon
in interface ElementDescription<T extends Element>
public void setIcon(javax.swing.ImageIcon icon)
icon
- - the new iconpublic Element newElementInstance(Workflow workflow)
ElementDescription
This methods should not add the new element to the given workflow.
Action(s) takes care of calling the appropried
Workflow.add(Element)
method.
newElementInstance
in interface ElementDescription<T extends Element>
workflow
- - the workflow that will own the element
public void addElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
ElementDescription
addElementDescriptionChangeListener
in interface ElementDescription<T extends Element>
listener
- - the listenerElementDescriptionChangeListener
public void removeElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
ElementDescription
removeElementDescriptionChangeListener
in interface ElementDescription<T extends Element>
listener
- - the listenerElementDescriptionChangeListener
public void fireElementDescriptionChanges(java.lang.String key, java.lang.String oldValue)
elementDescriptionChange(ElementDescriptionChangeEvent)
of
all the listeners.
key
- - the key of the description that changedoldValue
- the old value of the changed descriptionpublic java.lang.Object getSearchableValue(com.jbbres.lib.search.SearchField<?> field)
getSearchableValue
in interface com.jbbres.lib.search.Searchable
public int compareTo(ElementDescription<?> properties)
compareTo
in interface java.lang.Comparable<ElementDescription<?>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |