net.sf.doolin.gui.field
Class AbstractFieldText<V,J extends JTextComponent>

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.AbstractPropertyFieldDescriptor<V>
              extended by net.sf.doolin.gui.field.AbstractFieldText<V,J>
Type Parameters:
V - Type of object for the view
All Implemented Interfaces:
Serializable, IBean, FieldDescriptor<V>
Direct Known Subclasses:
FieldMemo, FieldText

public abstract class AbstractFieldText<V,J extends JTextComponent>
extends AbstractPropertyFieldDescriptor<V>

JTextField field descriptor.

See Also:
Serialized Form

Constructor Summary
AbstractFieldText()
           
 
Method Summary
 Field<V> createField(GUIView<V> view)
          Creates a field.
protected abstract  J createTextComponent()
           
protected  JComponent decorateComponent(J text)
          Decorates the text field before it is actually set as the field component
 int getColumns()
          Gets the columns.
 boolean isCommitOnFocusLost()
          Checks if is commit on focus lost.
 void setColumns(int columns)
          Sets the columns.
 void setCommitOnFocusLost(boolean commitOnFocusLost)
          Sets the commit on focus lost.
 void setDisplayState(Field<V> field, JComponent component, DisplayState displayState)
          Sets the display state of the field
 
Methods inherited from class net.sf.doolin.gui.field.AbstractPropertyFieldDescriptor
getAdapter, getProperty, getPropertyPath, setAdapter, setProperty, setPropertyPath, subscribe, subscribe
 
Methods inherited from class net.sf.doolin.gui.field.AbstractFieldDescriptor
getActionFactory, getConstraint, getDisplayStateHandler, getIconService, getName, getStyle, getTransferHandler, onInit, onShow, setActionFactory, setConstraint, 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

AbstractFieldText

public AbstractFieldText()
Method Detail

createField

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

Parameters:
view - the view
Returns:
the field< v>

createTextComponent

protected abstract J createTextComponent()

decorateComponent

protected JComponent decorateComponent(J text)
Decorates the text field before it is actually set as the field component

Parameters:
text - Text component
Returns:
Actual component

getColumns

public int getColumns()
Gets the columns.

Returns:
the columns

isCommitOnFocusLost

public boolean isCommitOnFocusLost()
Checks if is commit on focus lost.

Returns:
true, if is commit on focus lost

setColumns

public void setColumns(int columns)
Sets the columns.

Parameters:
columns - the new columns

setCommitOnFocusLost

public void setCommitOnFocusLost(boolean commitOnFocusLost)
Sets the commit on focus lost.

Parameters:
commitOnFocusLost - the new commit on focus lost

setDisplayState

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

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


Copyright © 2011. All Rights Reserved.