de.kosi.admin
Class GuiFactory

java.lang.Object
  |
  +--de.kosi.gui.util.ConstraintFactory
        |
        +--de.kosi.admin.GuiFactory

public class GuiFactory
extends ConstraintFactory

GuiFactory is a convenience class, for creating GUI elements. For the constraints it is assumed, that the GridBagLayout is used.

ChangeLog:

 $Log: GuiFactory.java,v $
 Revision 1.6  2001/06/27 19:09:18  jiriki
 Resolved minor bugs. Updated docs.

 Revision 1.5  2001/06/20 08:27:43  jiriki
 Merged ConnectDialog and LoginDialog

 Revision 1.4  2001/05/30 10:25:51  jiriki
 Refactored Client.

 Revision 1.3  2001/05/22 16:05:24  jiriki
 Made files more compliant to Coding Conventions.

 Revision 1.2  2001/05/22 10:16:02  jiriki
 - Removed old unused Client class
 - Removed unused import statements.

 Revision 1.1.1.1  2001/04/29 18:05:15  jiriki
 Imported sources from zola.

 Revision 1.10  2001/04/29 16:50:44  wombat
 Added ExceptionHandlers

 Revision 1.9  2001/04/24 23:19:22  wombat
 - Implemented I18N features of server
 - Implemented actions for Admin Client
 - Other changes is AdminClient

 Revision 1.8  2001/04/23 13:23:53  wombat
 Updated Documentation

 Revision 1.7  2001/04/22 20:26:18  wombat
 - I18N Admin Client.
 - Made Admin Client a little bit more compliant 
   to the Java Look And Feel Design Guidelines.

 Revision 1.6  2001/04/09 17:55:27  wombat
 Mail Interface Konfiguration eingefügt.

 Revision 1.5  2001/03/15 22:58:01  wombat
 Updated documentation

 Revision 1.4  2001/03/15 22:41:28  wombat
 - Worked on server admin client mockup
 - fixed smaller bugs
 - removed User.getPassword() method (use checkPassword instead)

 Revision 1.3  2001/03/15 19:31:51  wombat
 Updated Documentation

 Revision 1.2  2001/03/14 18:40:44  wombat
 Updated Documentation, removed bugs in Gui factory

 

Version:
$Revision: 1.6 $ ($Date: 2001/06/27 19:09:18 $)
Author:
Niklas Mehner

Method Summary
static javax.swing.JButton createButton(java.util.ResourceBundle resources, java.lang.String name)
          Create a new Button.
static javax.swing.JCheckBox createCheckBox(java.util.ResourceBundle resources, java.lang.String name)
          Create a new CheckBox.
static javax.swing.JComboBox createComboBox(java.lang.Object[] entries)
          Create a new ComboBox.
static javax.swing.JComboBox createComboBox(java.util.Vector entries)
          Create a new ComboBox.
static javax.swing.JLabel createLabel(java.util.ResourceBundle resources, java.lang.String name, javax.swing.JComponent labelFor)
          Create a new Label.
static javax.swing.JMenu createMenu(java.util.ResourceBundle resources, java.lang.String name)
          Creates a new menu.
static javax.swing.JMenuItem createMenuItem(java.util.ResourceBundle resources, java.lang.String name)
          Creates a new menu item.
static javax.swing.JPasswordField createPasswordField(java.util.ResourceBundle resources)
          Creates a new password field.
static javax.swing.JMenuItem createRelayedMenuItem(java.util.ResourceBundle resources, ActionRelayManager relayManager, java.lang.String name)
          Creates a new relayed menu item.
static JSaveableTextField createSaveableTextField(java.util.ResourceBundle resources, java.lang.String name, java.lang.String defaultValue)
          Create a new SaveableTextField.
static javax.swing.JSlider createSlider(int minimum, int maximum, int initial, int minorTicks, int majorTicks)
          Create a new Slider.
static javax.swing.JTextField createTextField(java.util.ResourceBundle resources, java.lang.String name)
          Create a new TextField.
static javax.swing.JTextField createTextField(java.util.ResourceBundle resources, java.lang.String name, java.lang.String defaultValue)
          Create a new TextField with a default value.
static javax.swing.JPanel createTitledPanel(java.util.ResourceBundle resources, java.lang.String name)
          Creates a new Panel with a titled border and using GridBagLayout.
static javax.swing.JToggleButton createToggleButton(java.util.ResourceBundle resources, java.lang.String name)
          Create a new ToggleButton.
static void initAction(java.util.ResourceBundle resources, javax.swing.Action action, java.lang.String name)
          Initialize an Action with values from a resource.
 
Methods inherited from class de.kosi.gui.util.ConstraintFactory
createConstraints, createConstraints, createEastConstraints, createFillHConstraints, createNorthWestConstraints, createNorthWestConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTextField

public static javax.swing.JTextField createTextField(java.util.ResourceBundle resources,
                                                     java.lang.String name)
Create a new TextField. All properties are loaded from the resources. The loaded values are: Field.default and Field.width.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the test field.
Returns:
A new JTextField.

createSaveableTextField

public static JSaveableTextField createSaveableTextField(java.util.ResourceBundle resources,
                                                         java.lang.String name,
                                                         java.lang.String defaultValue)
Create a new SaveableTextField. All properties are loaded from the resources. The loaded values are: Field.default and Field.width.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the test field.
defaultValue - The default vlaue of the field.
Returns:
A new JSaveableTextField.

createTextField

public static javax.swing.JTextField createTextField(java.util.ResourceBundle resources,
                                                     java.lang.String name,
                                                     java.lang.String defaultValue)
Create a new TextField with a default value. All properties are loaded from the resources. The loaded values are: Field.width.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the text field.
defaultValue - Default Value of the test field.
Returns:
A new JTextField.

createLabel

public static javax.swing.JLabel createLabel(java.util.ResourceBundle resources,
                                             java.lang.String name,
                                             javax.swing.JComponent labelFor)
Create a new Label. All properties are loaded from the resources. The loaded values are: Label.text and Label.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the label.
labelFor - Component this label is created for.
Returns:
A new JLabel.

createButton

public static javax.swing.JButton createButton(java.util.ResourceBundle resources,
                                               java.lang.String name)
Create a new Button. All properties are loaded from the resources. The loaded values are: Button.label and Button.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the button.
Returns:
A new JButton.

createToggleButton

public static javax.swing.JToggleButton createToggleButton(java.util.ResourceBundle resources,
                                                           java.lang.String name)
Create a new ToggleButton. All properties are loaded from the resources. The loaded values are: Button.label and Button.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the button.
Returns:
A new JButton.

createCheckBox

public static javax.swing.JCheckBox createCheckBox(java.util.ResourceBundle resources,
                                                   java.lang.String name)
Create a new CheckBox. All properties are loaded from the resources. The loaded values are: CheckBox.label and CheckBox.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the check box.
Returns:
A new JCheckBox.

createPasswordField

public static javax.swing.JPasswordField createPasswordField(java.util.ResourceBundle resources)
Creates a new password field. All properties are loaded from the resources. The loaded values are: PasswordField.width.
Parameters:
resources - Resources the properties are loaded from.
Returns:
A new password field.

createSlider

public static javax.swing.JSlider createSlider(int minimum,
                                               int maximum,
                                               int initial,
                                               int minorTicks,
                                               int majorTicks)
Create a new Slider.
Parameters:
minimum - Minimum value.
maximum - Maximum value.
initial - Initial value,
minorTicks - Minor Ticks on the slider.
majorTicks - Major Ticks on the slider.
Returns:
A new JSlider.

createComboBox

public static javax.swing.JComboBox createComboBox(java.util.Vector entries)
Create a new ComboBox.
Parameters:
entries - Entries in the ComboBox.
Returns:
A new ComboxBox.

createComboBox

public static javax.swing.JComboBox createComboBox(java.lang.Object[] entries)
Create a new ComboBox.
Parameters:
entries - Entries in the ComboBox.
Returns:
A new ComboxBox.

createMenu

public static javax.swing.JMenu createMenu(java.util.ResourceBundle resources,
                                           java.lang.String name)
Creates a new menu. All properties are loaded from the resources. The loaded values are: Menu.label and Menu.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the menu.
Returns:
A Menu.

createMenuItem

public static javax.swing.JMenuItem createMenuItem(java.util.ResourceBundle resources,
                                                   java.lang.String name)
Creates a new menu item. All properties are loaded from the resources. The loaded values are: MenuItem.label, MenuItem.accelerator and MenuItem.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the menu item.
Returns:
A MenuItem.

createRelayedMenuItem

public static javax.swing.JMenuItem createRelayedMenuItem(java.util.ResourceBundle resources,
                                                          ActionRelayManager relayManager,
                                                          java.lang.String name)
Creates a new relayed menu item. All properties are loaded from the resources. The loaded values are the same as those of a action.
Parameters:
resources - Resources the properties are loaded from.
relayManager - ActionRelayManager the menu item is registered with.
name - Name of the menu item.
Returns:
A MenuItem.

initAction

public static void initAction(java.util.ResourceBundle resources,
                              javax.swing.Action action,
                              java.lang.String name)
Initialize an Action with values from a resource. The values loaded from the resource are Action.label, Action.accelerator and Action.mnemonic.
Parameters:
resources - Resources the properties are loaded from.
action - Action that is initialized.
name - Name of the action.

createTitledPanel

public static javax.swing.JPanel createTitledPanel(java.util.ResourceBundle resources,
                                                   java.lang.String name)
Creates a new Panel with a titled border and using GridBagLayout. All properties are loaded from the resources. The loaded values are: Panel.label.
Parameters:
resources - Resources the properties are loaded from.
name - Name of the check box.
Returns:
A new Panel.