org.pm4j.core.pm.impl.title
Interface PmTitleProvider<T>

All Known Implementing Classes:
AsteriskAttrTitleProvider, PmTitleProviderValuebased, TitleProviderAttrValueBased, TitleProviderPmResBased

public interface PmTitleProvider<T>

Interface for classes that implement some algorithms to provide internationalized title resources.

Author:
olaf boede

Method Summary
 boolean canSetTitle(T item)
          Indicates if it is allowed to call the #setTitle(Object, Object, String) method for the given item.
 java.lang.String getIconPath(T item)
           
 java.lang.String getShortTitle(T item)
           
 java.lang.String getTitle(T item)
           
 java.lang.String getToolTip(T item)
           
 void setTitle(T item, java.lang.String titleString)
          An interface for 'in place editing' of node titles.
 

Method Detail

getTitle

java.lang.String getTitle(T item)
Parameters:
item - An item to get a title for.
Returns:
The title string for the given item.

getShortTitle

java.lang.String getShortTitle(T item)
Parameters:
item - An item to get the undecorated title for.
Returns:
The undecorated title string for the given item.
See Also:
PmTitledObject#getPmShortTitle()

getToolTip

java.lang.String getToolTip(T item)
Parameters:
item - The item to get a tooltip for.
Returns:
A tooltip string or null when there is no tooltip for the given item.

getIconPath

java.lang.String getIconPath(T item)
Parameters:
item - The item to get a icon name for.
Returns:
A icon string or null when there is no icon for the given item.

canSetTitle

boolean canSetTitle(T item)
Indicates if it is allowed to call the #setTitle(Object, Object, String) method for the given item.

Parameters:
item -
Returns:
true when it is allowed to call #setTitle(Object, Object, String).

setTitle

void setTitle(T item,
              java.lang.String titleString)
An interface for 'in place editing' of node titles.

That might be a useful feature for title string editors of tree views where a user can simply click on a title and change it.

Parameters:
item -
titleString -