net.sf.doolin.gui.swing
Class FormattedKeyLabelInfoProvider

java.lang.Object
  extended by net.sf.doolin.gui.swing.FormattedKeyLabelInfoProvider
All Implemented Interfaces:
LabelInfoProvider

public class FormattedKeyLabelInfoProvider
extends Object
implements LabelInfoProvider

This LabelInfoProvider uses a format to build the text key of both the text and the icon id.

Author:
Damien Coraboeuf

Constructor Summary
FormattedKeyLabelInfoProvider()
          Constructor, with no text and no icon.
 
Method Summary
 String getIconFormat()
          Gets the format that is used to build the text key of the icon id.
 LabelInfo getLabelIcon(Object item)
          Gets the label information.
 String getTextFormat()
          Gets the format that is used to get the text key of the text to display.
 void setIconFormat(String iconFormat)
          Sets the format that is used to build the text key of the icon id.
 void setIconService(IconService iconService)
          Sets the icon service used to access icons
 void setTextFormat(String textFormat)
          Sets the format that is used to get the text key of the text to display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattedKeyLabelInfoProvider

public FormattedKeyLabelInfoProvider()
Constructor, with no text and no icon.

Method Detail

getIconFormat

public String getIconFormat()
Gets the format that is used to build the text key of the icon id.

Returns:
Format

getLabelIcon

public LabelInfo getLabelIcon(Object item)
Description copied from interface: LabelInfoProvider
Gets the label information.

Specified by:
getLabelIcon in interface LabelInfoProvider
Parameters:
item - the item
Returns:
the label information

getTextFormat

public String getTextFormat()
Gets the format that is used to get the text key of the text to display.

Returns:
Format

setIconFormat

public void setIconFormat(String iconFormat)
Sets the format that is used to build the text key of the icon id.

Parameters:
iconFormat - Format

setIconService

public void setIconService(IconService iconService)
Sets the icon service used to access icons

Parameters:
iconService - Icon service

setTextFormat

public void setTextFormat(String textFormat)
Sets the format that is used to get the text key of the text to display.

Parameters:
textFormat - Format


Copyright © 2011. All Rights Reserved.