net.sf.doolin.gui.field
Class FieldButton<V>

java.lang.Object
  extended by net.sf.doolin.bus.bean.Bean
      extended by net.sf.doolin.gui.field.AbstractFieldDescriptor<V>
          extended by net.sf.doolin.gui.field.FieldButton<V>
Type Parameters:
V - Type of object for the view
All Implemented Interfaces:
Serializable, IBean, FieldDescriptor<V>

public class FieldButton<V>
extends AbstractFieldDescriptor<V>

JButton field descriptor.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
FieldButton()
           
 
Method Summary
 Field<V> createField(GUIView<V> view)
          Creates the field.
 GUIAction getAction()
          Gets the action.
protected  IconSize getActualIconSize(GUIView<V> view)
           
 DisplayStateHandler getDisplayStateHandler()
          Uses a conjunction between the action's handler and the button's handler.
 IconSize getIconSize()
           
 String getTextExpression()
          Returns the expression for an alternative text
 boolean isDefaultButton()
          Checks if is default button.
 void onShow(Field<V> field)
          Does nothing.
 void setAction(GUIAction action)
          Associated action to execute
 void setDefaultButton(boolean defaultButton)
          Sets to true if this is the default button.
 void setIconSize(IconSize iconSize)
           
 void setTextExpression(String textExpression)
          Sets the the expression for an alternative text
 
Methods inherited from class net.sf.doolin.gui.field.AbstractFieldDescriptor
getActionFactory, getConstraint, getIconService, getName, getStyle, getTransferHandler, onInit, setActionFactory, setConstraint, setDisplayState, setDisplayStateHandler, setIconService, setName, setStyle, setTransferHandler
 
Methods inherited from class net.sf.doolin.bus.bean.Bean
getBeanNotificationSupport, getParentBean, notify, setParentBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldButton

public FieldButton()
Method Detail

createField

public Field<V> createField(GUIView<V> view)
Creates the field.

Parameters:
view - the view
Returns:
the field< v>
See Also:
ActionFactory.createAction(ActionContext, GUIAction, IconSize)

getAction

public GUIAction getAction()
Gets the action.

Returns:
the action

getActualIconSize

protected IconSize getActualIconSize(GUIView<V> view)

getDisplayStateHandler

public DisplayStateHandler getDisplayStateHandler()
Uses a conjunction between the action's handler and the button's handler. Gets the display state handler.

Specified by:
getDisplayStateHandler in interface FieldDescriptor<V>
Overrides:
getDisplayStateHandler in class AbstractFieldDescriptor<V>
Returns:
the display state handler
See Also:
AndDisplayStateHandler

getIconSize

public IconSize getIconSize()

getTextExpression

public String getTextExpression()
Returns the expression for an alternative text

Returns:
Expression

isDefaultButton

public boolean isDefaultButton()
Checks if is default button.

Returns:
true, if is default button

onShow

public void onShow(Field<V> field)
Description copied from class: AbstractFieldDescriptor
Does nothing.

Specified by:
onShow in interface FieldDescriptor<V>
Overrides:
onShow in class AbstractFieldDescriptor<V>
Parameters:
field - Field that is shown

setAction

public void setAction(GUIAction action)
Associated action to execute

Parameters:
action - the new action

setDefaultButton

public void setDefaultButton(boolean defaultButton)
Sets to true if this is the default button.

Parameters:
defaultButton - true if this is the default button

setIconSize

public void setIconSize(IconSize iconSize)

setTextExpression

public void setTextExpression(String textExpression)
Sets the the expression for an alternative text

Parameters:
textExpression - Expression


Copyright © 2011. All Rights Reserved.