public class Install4JPropertyDescriptor
extends java.beans.PropertyDescriptor
Install4JBeanInfo
.
For file and script properties, derived classes are available.
Using this class is not strictly required. In principle, you could also set values for the ATTRIBUTE_*
constants in the property descriptor
of an unrelated property descriptor class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_ACTION_LIST_HIDDEN_KEYS |
static java.lang.String |
ATTRIBUTE_ACTION_LIST_SHOWN_KEYS |
static java.lang.String |
ATTRIBUTE_CONTEXT |
static java.lang.String |
ATTRIBUTE_PARENT_PROPERTY |
static java.lang.String |
ATTRIBUTE_PROPERTY_CATEGORY |
static java.lang.String |
ATTRIBUTE_PROPERTY_CHANGE_LISTENER |
static java.lang.String |
ATTRIBUTE_SORT_KEY |
static java.lang.String |
ATTRIBUTE_VARIABLE_VALUE_CLASS |
static java.lang.String |
ATTRIBUTE_VISIBILITY_DISCRIMINATOR |
static java.lang.String |
CATEGORY_CONFIGURATION
Default category used by install4j.
|
static java.lang.String |
CONTEXT_ANCHOR_CORNERS
Special context for properties of type
Anchor that tells the install4j GUI
to offer only the corner values of the anchor (north-west, north-east, south-west, south-east). |
static java.lang.String |
CONTEXT_ANCHOR_HORIZONTAL
Special context for properties of type
Anchor that tells the install4j GUI
to offer only the horizontal values of the anchor (west, center, east). |
static java.lang.String |
CONTEXT_ANCHOR_SIDES
Special context for properties of type
Anchor that tells the install4j GUI
to offer only the side values of the anchor (north, west, east, south). |
static java.lang.String |
CONTEXT_ANCHOR_VERTICAL
Special context for properties of type
Anchor that tells the install4j GUI
to offer only the vertical values of the anchor (north, center, south). |
static java.lang.String |
CONTEXT_COMPONENT_ID
Special context for properties of type
java.lang.String that tells the install4j GUI
to treat the string value as the ID of an installation component. |
static java.lang.String |
CONTEXT_DATETIME
Special context for properties of type
java.util.Date that tells the install4j GUI
to offer a time editor besides the default date editor as well. |
static java.lang.String |
CONTEXT_DOWNLOADABLE_COMPONENT_ID
Same as
CONTEXT_COMPONENT_ID , but only downloaded installation components are selectable. |
static java.lang.String |
CONTEXT_FORM_COMPONENT_ID
Special context for properties of type
java.lang.String that tells the install4j GUI
to treat the string value as the ID of a form component. |
static java.lang.String |
CONTEXT_HTML
Special context for properties of type
java.lang.String that tells the install4j GUI
to allow the user to enter an HTML document in a separate editor with syntax coloring and preview
functionality. |
static java.lang.String |
CONTEXT_LAUNCHER_ID
Special context for properties of type
java.lang.String that tells the install4j GUI
to treat the string value as the ID of a launcher. |
static java.lang.String |
CONTEXT_MULTILINE
Special context for properties of type
java.lang.String that tells the install4j GUI
to allow the user to enter multi-line strings in a separate dialog. |
static java.lang.String |
CONTEXT_NO_INSTALLER_VARIABLES
Special context for properties of type
java.lang.String and java.io.File that tells the install4j GUI
not to offer installer variables in the text field for the property. |
static java.lang.String |
CONTEXT_NON_SERVICE_LAUNCHER_ID
Same as
CONTEXT_LAUNCHER_ID , but service launchers are not selectable. |
static java.lang.String |
CONTEXT_SERVICE_LAUNCHER_ID
Same as
CONTEXT_LAUNCHER_ID , but only service launchers are selectable. |
static java.lang.String |
CONTEXT_STRING_TO_STRING_MAP
Special context for properties of type
java.util.LinkedHashMap that tells the install4j GUI
that the map contains string keys and values and to offer a suitable converter and property
customizer. |
static java.lang.String |
CONTEXT_VARIABLE_NAME
Special context for properties of type
java.lang.String that tells the install4j GUI
to treat the string value as a installer variable name. |
Modifier and Type | Method and Description |
---|---|
static Install4JPropertyDescriptor |
create(java.lang.String propertyName,
java.lang.Class beanClass,
java.lang.String displayName,
java.lang.String shortDescription)
|
static Install4JPropertyDescriptor |
create(java.lang.String propertyName,
java.lang.Class beanClass,
java.lang.String displayName,
java.lang.String shortDescription,
java.lang.String context)
Create a property descriptor that can be passed to
Install4JBeanInfo.addPropertyDescriptor(Install4JPropertyDescriptor) . |
Install4JPropertyDescriptor |
setActionListHiddenKeys(java.lang.String[] hiddenKeys)
Hide this property if the bean is shown in the configuration of an action list property whose configured action keys
contain one of the specified strings.
|
Install4JPropertyDescriptor |
setActionListShownKeys(java.lang.String[] shownKeys)
Show this property only if the bean is shown in the configuration of an action list property whose configured action keys
contain one of the specified strings.
|
Install4JPropertyDescriptor |
setContext(java.lang.String editorContext)
Set the context for the property.
|
void |
setDisplayName(java.lang.String displayName) |
Install4JPropertyDescriptor |
setHiddenInActionLists()
Do not show this property if the bean is shown in the configuration of the action list.
|
Install4JPropertyDescriptor |
setParentProperty(java.lang.String parentProperty)
Set the parent property under which this property should be shown in the install4j IDE.
|
Install4JPropertyDescriptor |
setPropertyCategory(java.lang.String propertyCategory)
Configures the property category.
|
Install4JPropertyDescriptor |
setPropertyChangeListener(java.beans.PropertyChangeListener listener)
Set a property change listener that is invoked when the property is changed in the IDE.
|
Install4JPropertyDescriptor |
setSortKey(java.lang.Integer sortKey)
Set an integer key by which properties are sorted.
|
Install4JPropertyDescriptor |
setVariableValueClass(java.lang.Class variableClass)
Set the class of the variable value, if
CONTEXT_VARIABLE_NAME is set. |
Install4JPropertyDescriptor |
setVisibilityDiscriminator(VisibilityDiscriminator visibilityDiscriminator)
Sets a visibility discriminator for this property.
|
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
public static final java.lang.String ATTRIBUTE_PROPERTY_CATEGORY
setPropertyCategory(String)
,
Constant Field Valuespublic static final java.lang.String CATEGORY_CONFIGURATION
public static final java.lang.String ATTRIBUTE_CONTEXT
public static final java.lang.String CONTEXT_LAUNCHER_ID
java.lang.String
that tells the install4j GUI
to treat the string value as the ID of a launcher. In the property panel, a drop-down list of
all defined launchers will be shown.public static final java.lang.String CONTEXT_NON_SERVICE_LAUNCHER_ID
CONTEXT_LAUNCHER_ID
, but service launchers are not selectable.public static final java.lang.String CONTEXT_SERVICE_LAUNCHER_ID
CONTEXT_LAUNCHER_ID
, but only service launchers are selectable.public static final java.lang.String CONTEXT_COMPONENT_ID
java.lang.String
that tells the install4j GUI
to treat the string value as the ID of an installation component. In the property panel, a drop-down list of
all defined installation components will be shown.public static final java.lang.String CONTEXT_FORM_COMPONENT_ID
java.lang.String
that tells the install4j GUI
to treat the string value as the ID of a form component. This is only relevant for properties of form
components. In the property panel, a drop-down list of all defined form components in the current screen
will be shown. Layout groups and the currently edited form component will not be shown.public static final java.lang.String CONTEXT_DOWNLOADABLE_COMPONENT_ID
CONTEXT_COMPONENT_ID
, but only downloaded installation components are selectable.public static final java.lang.String CONTEXT_MULTILINE
java.lang.String
that tells the install4j GUI
to allow the user to enter multi-line strings in a separate dialog.public static final java.lang.String CONTEXT_HTML
java.lang.String
that tells the install4j GUI
to allow the user to enter an HTML document in a separate editor with syntax coloring and preview
functionality.public static final java.lang.String CONTEXT_DATETIME
java.util.Date
that tells the install4j GUI
to offer a time editor besides the default date editor as well.public static final java.lang.String CONTEXT_VARIABLE_NAME
java.lang.String
that tells the install4j GUI
to treat the string value as a installer variable name. The user will be offered a selector to choose
pre-defined installer variables.public static final java.lang.String CONTEXT_NO_INSTALLER_VARIABLES
java.lang.String
and java.io.File
that tells the install4j GUI
not to offer installer variables in the text field for the property.public static final java.lang.String CONTEXT_STRING_TO_STRING_MAP
java.util.LinkedHashMap
that tells the install4j GUI
that the map contains string keys and values and to offer a suitable converter and property
customizer.public static final java.lang.String CONTEXT_ANCHOR_CORNERS
Anchor
that tells the install4j GUI
to offer only the corner values of the anchor (north-west, north-east, south-west, south-east).public static final java.lang.String CONTEXT_ANCHOR_SIDES
Anchor
that tells the install4j GUI
to offer only the side values of the anchor (north, west, east, south).public static final java.lang.String CONTEXT_ANCHOR_HORIZONTAL
Anchor
that tells the install4j GUI
to offer only the horizontal values of the anchor (west, center, east).public static final java.lang.String CONTEXT_ANCHOR_VERTICAL
Anchor
that tells the install4j GUI
to offer only the vertical values of the anchor (north, center, south).public static final java.lang.String ATTRIBUTE_SORT_KEY
setSortKey(Integer)
,
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_PROPERTY_CHANGE_LISTENER
public static final java.lang.String ATTRIBUTE_PARENT_PROPERTY
setParentProperty(String)
,
Constant Field Valuespublic static final java.lang.String ATTRIBUTE_VARIABLE_VALUE_CLASS
public static final java.lang.String ATTRIBUTE_VISIBILITY_DISCRIMINATOR
public static final java.lang.String ATTRIBUTE_ACTION_LIST_HIDDEN_KEYS
public static final java.lang.String ATTRIBUTE_ACTION_LIST_SHOWN_KEYS
public static Install4JPropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription)
public static Install4JPropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, java.lang.String context)
Install4JBeanInfo.addPropertyDescriptor(Install4JPropertyDescriptor)
.propertyName
- the name of the propertybeanClass
- the class of the bean that contains the property. Note: This is not the class of the property.displayName
- the display name of the propertyshortDescription
- a short description of the property in HTML format. You do not have to start the description with <html>, it will be prepended automatically.context
- the context of the property. The context allows to specify different editors for the same property types.
See the CONTEXT_*
properties for the built-in contexts. This context is also used for enumerated properties
in the EnumerationMapper
. For properties of type String[]
, you can pass an item name as the context.public Install4JPropertyDescriptor setContext(java.lang.String editorContext)
editorContext
- the contextthis
, for chained calls on this property descriptorfor an explanation of the context.
public Install4JPropertyDescriptor setPropertyCategory(java.lang.String propertyCategory)
You can collapse certain categories by default with the
Install4JBeanInfo.setCollapsedPropertyCategories(String[])
method.
propertyCategory
- the categorythis
, for chained calls on this property descriptorpublic void setDisplayName(java.lang.String displayName)
setDisplayName
in class java.beans.FeatureDescriptor
public Install4JPropertyDescriptor setSortKey(java.lang.Integer sortKey)
sortKey
- the sort keythis
, for chained calls on this property descriptorInstall4JBeanInfo.addPropertyDescriptor(Install4JPropertyDescriptor)
public Install4JPropertyDescriptor setVariableValueClass(java.lang.Class variableClass)
CONTEXT_VARIABLE_NAME
is set.
This information is displayed in the install4j IDE.variableClass
- the class of the variable valuethis
, for chained calls on this property descriptorpublic Install4JPropertyDescriptor setPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listenerthis
, for chained calls on this property descriptorpublic Install4JPropertyDescriptor setParentProperty(java.lang.String parentProperty)
For boolean properties, only descendant properties are only shown if the boolean value of the property
is selected as true
. If the user selection is false, all descendant properties will be hidden.
If the selection is changed to true, all descendant properties will be shown.
parentProperty
- the name of the parent propertythis
, for chained calls on this property descriptorpublic Install4JPropertyDescriptor setVisibilityDiscriminator(VisibilityDiscriminator visibilityDiscriminator)
setParentProperty(String)
has been called for this property descriptor.
Note that for a boolean parent properties, a default visibility discriminator is
set that hides children if the user selection of the parent property is false
.visibilityDiscriminator
- the visibility discriminatorthis
, for chained calls on this property descriptorVisibilityDiscriminator
public Install4JPropertyDescriptor setActionListHiddenKeys(java.lang.String[] hiddenKeys)
hiddenKeys
- an array with the the contexts of the ActionList
property for which the property should be hidden.
If one of the array elements is null
, the property is always hidden in action lists.this
, for chained calls on this property descriptorActionListPropertyDescriptor.setActionKeys(String[])
public Install4JPropertyDescriptor setActionListShownKeys(java.lang.String[] shownKeys)
shownKeys
- an array with the the contexts of the ActionList
property for which the property should be shown.this
, for chained calls on this property descriptorActionListPropertyDescriptor.setActionKeys(String[])
public Install4JPropertyDescriptor setHiddenInActionLists()
setActionListHiddenContexts(new String[] {null})
this
, for chained calls on this property descriptorActionListPropertyDescriptor