Joda System API

org.joda.swing.binder
Class PropertyBooleanRadioButtonGroupModel

java.lang.Object
  |
  +--org.joda.swing.binder.PropertyBooleanRadioButtonGroupModel
All Implemented Interfaces:
java.util.EventListener, JComponentBinder, java.beans.PropertyChangeListener

public class PropertyBooleanRadioButtonGroupModel
extends java.lang.Object
implements java.beans.PropertyChangeListener, JComponentBinder

JYesNoUnknownRadioButtonPanel model that binds to a property. Use of this model is best achieved by using SwingBinder.

This class can be used for both mutable and immutable properties. Immutable properties cannot be updated by the swing GUI, however they will update correctly if their value changes.

Author:
Stephen Colebourne

Nested Class Summary
 class PropertyBooleanRadioButtonGroupModel.RadioButtonModel
          The button model that is attached to each button
 
Constructor Summary
PropertyBooleanRadioButtonGroupModel()
          Constructor
PropertyBooleanRadioButtonGroupModel(JYesNoUnknownRadioButtonPanel comp, BooleanProperty property)
          Constructor that binds to a particular property.
 
Method Summary
protected  void activate()
          Activate the connection between the GUI and the model
 void bind(javax.swing.JComponent component, Property property)
          Bind a Property object to the component.
protected  void deactivate()
          Deactivate the connection between the GUI and the model
protected  boolean isReadOnly()
          Is the property read only
 void propertyChange(java.beans.PropertyChangeEvent event)
          Handle programmatic changes made to the property by updating the swing model.
 void setActive(boolean active)
          Set the model to GUI binding as active or inactive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyBooleanRadioButtonGroupModel

public PropertyBooleanRadioButtonGroupModel()
Constructor


PropertyBooleanRadioButtonGroupModel

public PropertyBooleanRadioButtonGroupModel(JYesNoUnknownRadioButtonPanel comp,
                                            BooleanProperty property)
Constructor that binds to a particular property.

Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Handle programmatic changes made to the property by updating the swing model.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - the property change event

isReadOnly

protected boolean isReadOnly()
Is the property read only


setActive

public void setActive(boolean active)
Set the model to GUI binding as active or inactive

Specified by:
setActive in interface JComponentBinder

activate

protected void activate()
Activate the connection between the GUI and the model


deactivate

protected void deactivate()
Deactivate the connection between the GUI and the model


bind

public void bind(javax.swing.JComponent component,
                 Property property)
Description copied from interface: JComponentBinder
Bind a Property object to the component.

Specified by:
bind in interface JComponentBinder
Parameters:
component - the component to bind
property - the property to bind to
See Also:
JComponentBinder.bind(JComponent,Property)

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.