net.sf.doolin.gui.field
Class FieldRadio<V,T>

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.FieldRadio<V,T>
Type Parameters:
V - Type of bean for the view
T - Value associated with the radio button
All Implemented Interfaces:
Serializable, IBean, FieldDescriptor<V>

public class FieldRadio<V,T>
extends AbstractPropertyFieldDescriptor<V>

This field defines a JRadioButton.

Author:
Damien Coraboeuf
See Also:
Serialized Form

Constructor Summary
FieldRadio()
           
 
Method Summary
 Field<V> createField(GUIView<V> view)
          Creates a field.
 String getGroup()
          Gets the name of the group this radio button belongs to.
 String getText()
          Gets the text expression for this radio button.
 T getValue()
          Gets the associated value for this radio button.
 void setGroup(String group)
          Sets the name of the group this radio button belongs to.
 void setText(String text)
          Sets the text expression for this radio button.
 void setValue(T value)
          Sets the associated value for this radio button.
 
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, 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

FieldRadio

public FieldRadio()
Method Detail

createField

public Field<V> createField(GUIView<V> view)
Description copied from interface: FieldDescriptor
Creates a field.

Parameters:
view - Owning view
Returns:
Created field

getGroup

public String getGroup()
Gets the name of the group this radio button belongs to.

Returns:
Group name

getText

public String getText()
Gets the text expression for this radio button.

Returns:
Text expression

getValue

public T getValue()
Gets the associated value for this radio button. The radio button will be selected if the model property is equal to this value. If the radio button is selected, the model property is update to this value.

Returns:
Property value

setGroup

public void setGroup(String group)
Sets the name of the group this radio button belongs to.

Parameters:
group - Group name

setText

public void setText(String text)
Sets the text expression for this radio button.

Parameters:
text - Text expression

setValue

public void setValue(T value)
Sets the associated value for this radio button. The radio button will be selected if the model property is equal to this value. If the radio button is selected, the model property is update to this value.

Parameters:
value - Property value


Copyright © 2011. All Rights Reserved.