net.sf.jguiraffe.gui.builder.action
Class ActionDataImpl

java.lang.Object
  extended by net.sf.jguiraffe.gui.builder.action.ActionDataImpl
All Implemented Interfaces:
ActionData
Direct Known Subclasses:
SimplePopupMenuHandler

public class ActionDataImpl
extends java.lang.Object
implements ActionData

A straight forward implementation of the ActionData interface.

This class defines member variables for all the get and set methods defined by the ActionData interface. The access methods operate directly on these fields.

Implementation note: This class is not thread-safe.

Version:
$Id: ActionDataImpl.java 156 2009-03-03 21:04:47Z oheger $
Author:
Oliver Heger

Constructor Summary
ActionDataImpl()
           
 
Method Summary
 Accelerator getAccelerator()
          Returns the accelerator.
 java.lang.Object getIcon()
          Returns the icon for the represented action.
 int getMnemonicKey()
          Returns the mnemonic key.
 java.lang.String getName()
          Returns the name of this action.
 java.lang.Object getTask()
          Returns the task of this action.
 java.lang.String getText()
          Returns the text of this action.
 java.lang.String getToolTip()
          Returns the tool tip of this action.
 void setAccelerator(Accelerator accelerator)
          Sets the accelerator.
 void setIcon(java.lang.Object icon)
          Sets the icon for the represented action.
 void setMnemonicKey(int mnemonicKey)
          Sets the mnemonic key.
 void setName(java.lang.String name)
          Sets the name of this action.
 void setTask(java.lang.Object t)
          Allows setting the task of this action.
 void setText(java.lang.String text)
          Sets the text of this action.
 void setToolTip(java.lang.String toolTip)
          Sets the tool tip text of this action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDataImpl

public ActionDataImpl()
Method Detail

getIcon

public java.lang.Object getIcon()
Returns the icon for the represented action.

Specified by:
getIcon in interface ActionData
Returns:
the icon

setIcon

public void setIcon(java.lang.Object icon)
Sets the icon for the represented action. The object passed to this method must be a valid icon for the GUI library used.

Parameters:
icon - the icon

getMnemonicKey

public int getMnemonicKey()
Returns the mnemonic key.

Specified by:
getMnemonicKey in interface ActionData
Returns:
the mnemonic

setMnemonicKey

public void setMnemonicKey(int mnemonicKey)
Sets the mnemonic key.

Parameters:
mnemonicKey - the key code

getAccelerator

public Accelerator getAccelerator()
Returns the accelerator.

Specified by:
getAccelerator in interface ActionData
Returns:
the accelerator

setAccelerator

public void setAccelerator(Accelerator accelerator)
Sets the accelerator.

Parameters:
accelerator - the accelerator

getName

public java.lang.String getName()
Returns the name of this action.

Specified by:
getName in interface ActionData
Returns:
the action name

setName

public void setName(java.lang.String name)
Sets the name of this action.

Parameters:
name - the action name

getTask

public java.lang.Object getTask()
Returns the task of this action.

Specified by:
getTask in interface ActionData
Returns:
the task

setTask

public void setTask(java.lang.Object t)
Allows setting the task of this action. This task will be executed when the action is triggered. The object passed to this method must be a valid task. However, this method does not perform any validity checks; it just stores the object.

Parameters:
t - the task

getText

public java.lang.String getText()
Returns the text of this action.

Specified by:
getText in interface ActionData
Returns:
the action text

setText

public void setText(java.lang.String text)
Sets the text of this action.

Parameters:
text - the text

getToolTip

public java.lang.String getToolTip()
Returns the tool tip of this action.

Specified by:
getToolTip in interface ActionData
Returns:
the tool tip text

setToolTip

public void setToolTip(java.lang.String toolTip)
Sets the tool tip text of this action.

Parameters:
toolTip - the tool tip text


Copyright © 2009 The JGUIraffe Team. All Rights Reserved.