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

java.lang.Object
  extended by net.sf.doolin.bus.bean.Bean
      extended by net.sf.doolin.gui.field.AbstractFieldDescriptor<V>
Type Parameters:
V - Type of object for the view
All Implemented Interfaces:
Serializable, IBean, FieldDescriptor<V>
Direct Known Subclasses:
AbstractPropertyFieldDescriptor, BusMonitoringChartField, FieldButton, FieldLabel, FieldSeparator, FieldTable, FormSection

public abstract class AbstractFieldDescriptor<V>
extends Bean
implements FieldDescriptor<V>

Abstract field descriptor.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
AbstractFieldDescriptor()
           
 
Method Summary
 ActionFactory getActionFactory()
          Returns the action factory
 String getConstraint()
          Gets the constraint.
 DisplayStateHandler getDisplayStateHandler()
          Gets the display state handler.
 IconService getIconService()
          Gets the IconService service that is used to access icons.
 String getName()
          Name for the field.
 Style getStyle()
          Returns the style
 TransferHandler getTransferHandler()
          Returns the transfer handler associated with this field.
 void onInit(Field<V> field)
          Does nothing.
 void onShow(Field<V> field)
          Does nothing.
 void setActionFactory(ActionFactory actionFactory)
          Sets the action factory for the creation of action-related components.
 void setConstraint(String constraint)
          Sets the constraint for the layout.
 void setDisplayState(Field<V> field, JComponent component, DisplayState displayState)
          Sets the display state of the field
 void setDisplayStateHandler(DisplayStateHandler displayStateHandler)
          Sets the display state handler.
 void setIconService(IconService iconService)
          Sets the IconService service that is used to access the icons.
 void setName(String name)
          Sets the name for the field.
 void setStyle(Style style)
          Sets the style for the component
 void setTransferHandler(TransferHandler transferHandler)
          Sets the transfer handler for this field.
 
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
 
Methods inherited from interface net.sf.doolin.gui.field.FieldDescriptor
createField
 

Constructor Detail

AbstractFieldDescriptor

public AbstractFieldDescriptor()
Method Detail

getActionFactory

public ActionFactory getActionFactory()
Description copied from interface: FieldDescriptor
Returns the action factory

Specified by:
getActionFactory in interface FieldDescriptor<V>
Returns:
Action factory

getConstraint

public String getConstraint()
Gets the constraint.

Specified by:
getConstraint in interface FieldDescriptor<V>
Returns:
the constraint

getDisplayStateHandler

public DisplayStateHandler getDisplayStateHandler()
Description copied from interface: FieldDescriptor
Gets the display state handler.

Specified by:
getDisplayStateHandler in interface FieldDescriptor<V>
Returns:
the display state handler

getIconService

public IconService getIconService()
Gets the IconService service that is used to access icons.

Returns:
Icon service

getName

public String getName()
Description copied from interface: FieldDescriptor
Name for the field.

Specified by:
getName in interface FieldDescriptor<V>
Returns:
Name

getStyle

public Style getStyle()
Returns the style

Specified by:
getStyle in interface FieldDescriptor<V>
Returns:
Style

getTransferHandler

public TransferHandler getTransferHandler()
Description copied from interface: FieldDescriptor
Returns the transfer handler associated with this field.

Specified by:
getTransferHandler in interface FieldDescriptor<V>
Returns:
Transfer handler or null
See Also:
JComponent.setTransferHandler(TransferHandler)

onInit

public void onInit(Field<V> field)
Does nothing.

Specified by:
onInit in interface FieldDescriptor<V>
Parameters:
field - Field that is created

onShow

public void onShow(Field<V> field)
Does nothing.

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

setActionFactory

public void setActionFactory(ActionFactory actionFactory)
Sets the action factory for the creation of action-related components.

Parameters:
actionFactory - Action factory

setConstraint

public void setConstraint(String constraint)
Sets the constraint for the layout.

Parameters:
constraint - the new constraint

setDisplayState

public void setDisplayState(Field<V> field,
                            JComponent component,
                            DisplayState displayState)
Description copied from interface: FieldDescriptor
Sets the display state of the field

Specified by:
setDisplayState in interface FieldDescriptor<V>
Parameters:
field - Field
component - Decorated field component

setDisplayStateHandler

public void setDisplayStateHandler(DisplayStateHandler displayStateHandler)
Sets the display state handler.

Parameters:
displayStateHandler - the new display state handler

setIconService

public void setIconService(IconService iconService)
Sets the IconService service that is used to access the icons.

Note:It is Autowired by the Spring configuration.

Parameters:
iconService - Icon service

setName

public void setName(String name)
Sets the name for the field.

Parameters:
name - Field name

setStyle

public void setStyle(Style style)
Sets the style for the component

Parameters:
style - Style

setTransferHandler

public void setTransferHandler(TransferHandler transferHandler)
Sets the transfer handler for this field.

Parameters:
transferHandler - Transfer handler


Copyright © 2011. All Rights Reserved.