net.sf.doolin.gui.action.path.statusbar
Class StatusBarLabel

java.lang.Object
  extended by net.sf.doolin.gui.action.path.statusbar.StatusBarLabel
All Implemented Interfaces:
StatusBarComponent

public class StatusBarLabel
extends Object
implements StatusBarComponent

Status bar component that displays a JLabel, whose content is bound to the application using a LabelConnector.

Author:
Damien Coraboeuf

Constructor Summary
StatusBarLabel()
           
 
Method Summary
protected  void connect(ActionContext actionContext, JLabel label)
          Uses the connector to bind the label test
 JComponent createComponent(ActionContext actionContext)
          Creates the component for the given action context.
 GUIAction getAction()
          Gets the action to execute when the user clicks on the label.
 LabelConnector getConnector()
          Gets the connector for the label text
 void setAction(GUIAction action)
          Sets the action to execute when the user clicks on the label.
 void setConnector(LabelConnector connector)
          Sets the connector for the label text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusBarLabel

public StatusBarLabel()
Method Detail

connect

protected void connect(ActionContext actionContext,
                       JLabel label)
Uses the connector to bind the label test

Parameters:
actionContext - Action context to bind into
label - Label to bind
See Also:
LabelConnector.connect(ActionContext, JLabel)

createComponent

public JComponent createComponent(ActionContext actionContext)
Description copied from interface: StatusBarComponent
Creates the component for the given action context.

Specified by:
createComponent in interface StatusBarComponent
Parameters:
actionContext - Action context to create the component into.
Returns:
Component to install in the status bar

getAction

public GUIAction getAction()
Gets the action to execute when the user clicks on the label.

Returns:
Action or null if no action must be executed

getConnector

public LabelConnector getConnector()
Gets the connector for the label text

Returns:
Label connector

setAction

public void setAction(GUIAction action)
Sets the action to execute when the user clicks on the label.

Parameters:
action - Action or null if no action must be executed

setConnector

public void setConnector(LabelConnector connector)
Sets the connector for the label text

Parameters:
connector - Label connector


Copyright © 2011. All Rights Reserved.