Overview  Package   Class  Tree  Index 

be.lassi.ui.base
Class WidgetFactory

java.lang.Object
  extended by be.lassi.ui.base.WidgetFactory

public class WidgetFactory
extends java.lang.Object

Creates the different widgets that can be used to update value holder values and that get updated when the value holder value changes.


Method Summary
static javax.swing.JCheckBox createCheckBox(java.lang.String text, BooleanHolder holder)
          Creates a new checkbox.
static javax.swing.JComboBox createComboBox(java.lang.String[] list, Holder<java.lang.String> holder)
          Creates a new combo box.
static javax.swing.JTextField createTextField(Holder<java.lang.String> holder)
          Creates a new text field.
static javax.swing.JTextField createTextField(IntHolder holder)
          Creates a new text field for an integer value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCheckBox

public static javax.swing.JCheckBox createCheckBox(java.lang.String text,
                                                   BooleanHolder holder)
Creates a new checkbox. The checkbox will be updated when the value in the value holder is changed. The value holder is updated when the user clicks the checkbox.

Parameters:
text - the string to be shown for the checkbox
holder - the boolean holder with the state to be represented by the checkbox
Returns:
the new checkbox

createComboBox

public static javax.swing.JComboBox createComboBox(java.lang.String[] list,
                                                   Holder<java.lang.String> holder)
Creates a new combo box.

Parameters:
list - the list of options to select from in the combo box
holder - the holder with the selected value
Returns:
the new combo box

createTextField

public static javax.swing.JTextField createTextField(Holder<java.lang.String> holder)
Creates a new text field.

Parameters:
holder - the holder with the text
Returns:
the new text field

createTextField

public static javax.swing.JTextField createTextField(IntHolder holder)
Creates a new text field for an integer value.

Parameters:
holder - the integer value holder
Returns:
the new next field

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2