net.sf.doolin.gui.field
Interface FieldDescriptor<V>

Type Parameters:
V - Type of object for the view
All Known Implementing Classes:
AbstractFieldDescriptor, AbstractFieldText, AbstractListPropertyFieldDescriptor, AbstractPropertyFieldDescriptor, BusMonitoringChartField, FieldButton, FieldCheck, FieldColor, FieldCombo, FieldDecimal, FieldFile, FieldFont, FieldInteger, FieldLabel, FieldLabelInfo, FieldLong, FieldMemo, FieldMultiCombo, FieldPassword, FieldRadio, FieldRadioGroup, FieldSeparator, FieldTable, FieldTemplate, FieldText, FieldToggle, FieldTree, FormSection

public interface FieldDescriptor<V>

Field definition.

Author:
Damien Coraboeuf

Method Summary
 Field<V> createField(GUIView<V> view)
          Creates a field.
 ActionFactory getActionFactory()
          Returns the action factory
 String getConstraint()
          Layout constraint for the field.
 DisplayStateHandler getDisplayStateHandler()
          Gets the display state handler.
 String getName()
          Name for the field.
 Style getStyle()
          Returns the style to apply on the field component
 TransferHandler getTransferHandler()
          Returns the transfer handler associated with this field.
 void onInit(Field<V> field)
          Called when the field view is created.
 void onShow(Field<V> field)
          Called when the field is shown for the user.
 void setDisplayState(Field<V> field, JComponent component, DisplayState displayState)
          Sets the display state of the field
 

Method Detail

createField

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

Parameters:
view - Owning view
Returns:
Created field

getActionFactory

ActionFactory getActionFactory()
Returns the action factory

Returns:
Action factory

getConstraint

String getConstraint()
Layout constraint for the field.

Returns:
Constraint

getDisplayStateHandler

DisplayStateHandler getDisplayStateHandler()
Gets the display state handler.

Returns:
the display state handler

getName

String getName()
Name for the field.

Returns:
Name

getStyle

Style getStyle()
Returns the style to apply on the field component

Returns:
Style to apply or null if none is to be applied.

getTransferHandler

TransferHandler getTransferHandler()
Returns the transfer handler associated with this field.

Returns:
Transfer handler or null
See Also:
JComponent.setTransferHandler(TransferHandler)

onInit

void onInit(Field<V> field)
Called when the field view is created. It can be called only once per field.

Parameters:
field - Field that is created

onShow

void onShow(Field<V> field)
Called when the field is shown for the user. It can be called several times.

Parameters:
field - Field that is shown

setDisplayState

void setDisplayState(Field<V> field,
                     JComponent component,
                     DisplayState displayState)
Sets the display state of the field

Parameters:
field - Field
component - Decorated field component
displayState -


Copyright © 2011. All Rights Reserved.