org.pm4j.core.pm.annotation
Annotation Type PmTitleCfg


@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD})
public @interface PmTitleCfg

Title definition annotation.

Usage:
When no PmTitleCfg annotation or an annotation without any attribute is specified, the title for the presentation model will be based on the resource key PmObject#getPmResKey() and the provided resource strings found in property files.

When only the attribute attrValue() is specified, then the value of the attribute with the given name will be used.

When the attribute titleProvider() is specified, then an instance of the specified implementation of PmTitleProvider will be used.

TODOC olaf: Add the added semantic for fix key and fix title value specification.

Author:
olaf boede

Optional Element Summary
 java.lang.String attrValue
          Name of an attribute that should be used to get the title value.
 java.lang.String icon
          Specifies a fix icon value to be used.
Useful for single language applications that define resources within the Java code.
 java.lang.String resKey
          Specifies a fix resource key to be used for the title, tooltip and icon of this PM.
 java.lang.String resKeyBase
          Specifies a fix resource key, used for this PM and as prefix part of the resource key of the composite children.
 java.lang.String title
          Specifies a fix title value to be used.
Useful for single language applications that define resources within the Java code.
 java.lang.Class<?> titleProvider
          When the default title provider does not match your requirements, you may specify here one that supports your special use case.
 java.lang.String tooltip
          Specifies a fix tooltip value to be used.
Useful for single language applications that define resources within the Java code.
 boolean tooltipUsesTitle
           
 

attrValue

public abstract java.lang.String attrValue
Name of an attribute that should be used to get the title value.

Example: The value of the user name should be used as title value for user objects. To get that, specify that attribute name ('name') in this field.

Returns:
Name of an attribute that should be used for the title.
Default:
""

titleProvider

public abstract java.lang.Class<?> titleProvider
When the default title provider does not match your requirements, you may specify here one that supports your special use case.

Returns:
The title provider to be used for this presententation model.
Default:
java.lang.Void.class

resKey

public abstract java.lang.String resKey
Specifies a fix resource key to be used for the title, tooltip and icon of this PM.

This value has no influence on the resource keys of the children of this Element. Use resKeyBase() to define a key that will also be used by the PM composite children.
If both, resKey() and resKeyBase() are specified, the resKeyBase() definition will be applied to the composite children and resKey() will be applied to the title etc. of this PM.

The system constructs PM resource keys usually based on the name of elements and their composite children.
Example key 'userPm.password'.
See also: PmObject#getPmResKey().

In some cases it might be useful to have resource keys that are manually specified. If you specify that key here, the default key will be ignored and the specified one will be used.

Returns:
The manually specified resource key.
Default:
""

resKeyBase

public abstract java.lang.String resKeyBase
Specifies a fix resource key, used for this PM and as prefix part of the resource key of the composite children.

For more information see resKey().

Returns:
The resource key for this PM, used also as prefix part of the composite children.
Default:
""

tooltipUsesTitle

public abstract boolean tooltipUsesTitle
Returns:
true when the title should be use as toolTip too.
Default:
false

title

public abstract java.lang.String title
Specifies a fix title value to be used.
Useful for single language applications that define resources within the Java code.

Will only be used when attrValue(), resKey() and titleProvider() are not specified.

Returns:
A fix title value specification.
Default:
""

tooltip

public abstract java.lang.String tooltip
Specifies a fix tooltip value to be used.
Useful for single language applications that define resources within the Java code.

Will only be used when attrValue(), resKey() and titleProvider() are not specified.

Returns:
A fix tooltip value specification.
Default:
""

icon

public abstract java.lang.String icon
Specifies a fix icon value to be used.
Useful for single language applications that define resources within the Java code.

Will only be used when attrValue(), resKey() and titleProvider() are not specified.

Returns:
A fix icon value specification.
Default:
""