|
||||||||||
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.ResourceBundleElementDescription<T> com.jbbres.lib.actions.tools.elements.AbstractElementDescription<Action> com.jbbres.lib.actions.tools.elements.DefaultActionDescription
public class DefaultActionDescription
Provides information regarding the action, such as its name, a short description, its version number etc.
This class provides the description of an action by extracting the content of
an element properties file (.properties).
A properties file is a simple text file. You can create and maintain a
properties file with just about any text editor.
The name of this file begins with the base name of your action, but start
with a lower case, and ends with the .properties suffix. For example, if your
action class base name is MyAction
, Therefore the properties
file is called myAction.properties
. This file contains the
following lines:
# This is the default myAction.properties file
type=action
service=com.acme.MyActionService
action.ui=com.acme.MyActionUI
description.title=Add Text To File Name
description.summary=This action add a text before or after\
the names of the files or folders passed into it.
description.icon=icon.png
description.categories=#FilesCategory
description.input=Files/Folders
description.output=Files/Folders
description.company.name=Acme
description.company.website=http://www.acme.com/
description.company.support=http://www.acme.com/
description.version=1.0
description.copyright=© 2009-2010 Acme
Amoung other usages, The properties are used by Action(s) to displays
the description in its lower-left view whenever the user selects the action.
The description briefly describes what the action does and tells users
anything else they should know about the action.
Because the description fits into a relatively small area of the
Action(s) window, you should make it as concise and brief as possible.
Ideally the user should not have to scroll the description view to see all of
the text.
A description has several parts:
v1.1.0:
Field Summary | |
---|---|
static java.lang.String |
CAN_SHOW_WHEN_RUN
The property key associated to a boolean value that define if "show when run" is on |
static java.lang.String |
PROMPT
The property key associated to the default "Show when run" prompt text |
static java.lang.String |
SHOW_WHEN_RUN
The property key associated to a boolean value that define the default state of the "Show when run" option |
static java.lang.String |
UI
The property key associated to the User Interface class. |
Fields inherited from class com.jbbres.lib.actions.tools.elements.AbstractElementDescription |
---|
SERVICE |
Fields inherited from interface com.jbbres.lib.actions.elements.ActionDescription |
---|
DEFAULT_INPUT_PROVIDER, DESCRIPTION_INPUT, DESCRIPTION_OUTPUT, WARNING_CANCEL_BUTTON, WARNING_CONTINUE_BUTTON, WARNING_MESSAGE, WARNING_SUGGESTED_ACTION |
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 | |
---|---|
DefaultActionDescription(java.lang.Class<? extends AbstractAction> actionClass)
Instantiates a new action description. |
Method Summary | |
---|---|
javax.swing.ImageIcon |
defaultIcon()
Returns the element default icon. |
static java.lang.String |
defaultShowDuringExecutionPrompt(ActionDescription actionDescription)
A convenience method that returns the default prompt value of the action. |
static boolean |
defaultShowDuringExecutionStatus(ActionDescription actionDescription)
A convenience method that returns true if the
"show when running the workflow" checkbox is selected by default. |
static java.lang.Class<AbstractActionUI> |
getUIClass(ActionDescription actionDescription)
A convenience method that returns the UI class associated to the action. |
static boolean |
isShowDuringExecutionAvailable(ActionDescription actionDescription)
A convenience method that returns true if the
"show when run" functionalitity is available for the action. |
Methods inherited from class com.jbbres.lib.actions.tools.elements.ResourceBundleElementDescription |
---|
addElementDescriptionChangeListener, compareTo, fireElementDesccriptionChange, getCategories, getDescription, getElementClass, getElementDescription, getIcon, getSearchableValue, newElementInstance, removeElementDescriptionChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jbbres.lib.actions.elements.ElementDescription |
---|
addElementDescriptionChangeListener, getCategories, getDescription, getIcon, newElementInstance, removeElementDescriptionChangeListener |
Methods inherited from interface com.jbbres.lib.search.Searchable |
---|
getSearchableValue |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
public static final java.lang.String UI
AbstractActionUI
.
The value associated to this key should be the User Interface class full name
public static final java.lang.String CAN_SHOW_WHEN_RUN
public static final java.lang.String SHOW_WHEN_RUN
public static final java.lang.String PROMPT
Constructor Detail |
---|
public DefaultActionDescription(java.lang.Class<? extends AbstractAction> actionClass) throws java.io.IOException
actionClass
- - the action class
java.io.IOException
- Signals that an I/O exception has occurred.Method Detail |
---|
public javax.swing.ImageIcon defaultIcon()
ResourceBundleElementDescription
defaultIcon
in class ResourceBundleElementDescription<Action>
public static boolean isShowDuringExecutionAvailable(ActionDescription actionDescription)
true
if the
"show when run" functionalitity is available for the action.
actionDescription
- - the action description
true
if the "show when run" functionalitity is
available for the actionpublic static boolean defaultShowDuringExecutionStatus(ActionDescription actionDescription)
true
if the
"show when running the workflow" checkbox is selected by default.
actionDescription
- - the action description
true
if the "show when running the workflow" checkbox
is selected by defaultpublic static java.lang.String defaultShowDuringExecutionPrompt(ActionDescription actionDescription)
actionDescription
- - the action description
public static java.lang.Class<AbstractActionUI> getUIClass(ActionDescription actionDescription)
actionDescription
- - the action description
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |