edu.ucsb.nceas.morpho.plugins.datapackagewizard
Class WidgetFactory

java.lang.Object
  extended byedu.ucsb.nceas.morpho.plugins.datapackagewizard.WidgetFactory

public class WidgetFactory
extends java.lang.Object


Method Summary
static void addTitledBorder(javax.swing.JComponent component, java.lang.String title)
           
static java.awt.Dimension getDimForNumberOfLines(int numberOfLines)
           
static void hiliteComponent(javax.swing.JComponent component)
           
static javax.swing.JCheckBox makeCheckBox(java.lang.String labelStr, boolean hiliteRequired)
           
static javax.swing.JPanel makeCheckBoxPanel(java.lang.String[] boxesText, int selectedIndex, java.awt.event.ItemListener listener)
           
static javax.swing.JDialog makeContainerDialog(javax.swing.JPanel centerPanel, java.awt.event.ActionListener okListener, java.awt.event.ActionListener cancelListener)
          Function that creates a container dialog for a given panel.
static javax.swing.JDialog makeContainerDialog(javax.swing.JPanel centerPanel, java.awt.event.ActionListener okListener, java.awt.event.ActionListener cancelListener, java.lang.String okCaption, java.lang.String cancelCaption)
          Function that creates a container dialog for a given panel.
static javax.swing.JDialog makeContainerDialogNoParent(javax.swing.JPanel centerPanel, java.awt.event.ActionListener okListener, java.awt.event.ActionListener cancelListener)
           
static javax.swing.JDialog makeContainerDialogNoParent(javax.swing.JPanel centerPanel, java.awt.event.ActionListener okListener, java.awt.event.ActionListener cancelListener, java.lang.String okCaption, java.lang.String cancelCaption)
          Function that creates a container dialog for a given panel.
static java.awt.Component makeDefaultSpacer()
           
static java.awt.Component makeHalfSpacer()
           
static javax.swing.JLabel makeHTMLLabel(java.lang.String text, int numberOfLines)
           
static javax.swing.JLabel makeHTMLLabel(java.lang.String text, int numberOfLines, boolean hiliteRequired)
           
static javax.swing.JButton makeJButton(java.lang.String title, java.awt.event.ActionListener actionListener)
           
static javax.swing.JButton makeJButton(java.lang.String title, java.awt.event.ActionListener actionListener, java.awt.Dimension dims)
           
static javax.swing.JLabel makeLabel(java.lang.String text, boolean hiliteRequired)
           
static javax.swing.JLabel makeLabel(java.lang.String text, boolean hiliteRequired, java.awt.Dimension dims)
           
static CustomList makeList(java.lang.String[] colNames, java.lang.Object[] colTemplates, int displayRows, boolean showAddButton, boolean showEditButton, boolean showDuplicateButton, boolean showDeleteButton, boolean showMoveUpButton, boolean showMoveDownButton)
           
static javax.swing.JTextField makeOneLineTextField()
           
static javax.swing.JTextField makeOneLineTextField(java.lang.String initialValue)
           
static javax.swing.JPanel makePanel()
           
static javax.swing.JPanel makePanel(int numberOfLines)
           
static javax.swing.JComboBox makePickList(java.lang.String[] listValues, boolean isEditable, int selectedIndex, java.awt.event.ItemListener listener)
           
static javax.swing.JPanel makeRadioPanel(java.lang.String[] buttonsText, int selectedIndex, java.awt.event.ActionListener listener)
           
static javax.swing.JTextArea makeTextArea(java.lang.String text, int numberOfRows, boolean isEditable)
           
static javax.swing.JPanel makeVerticalPanel(int numberOfLines)
           
static void setPrefMaxSizes(javax.swing.JComponent component, java.awt.Dimension dims)
           
static void unhiliteComponent(javax.swing.JComponent component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeTextArea

public static javax.swing.JTextArea makeTextArea(java.lang.String text,
                                                 int numberOfRows,
                                                 boolean isEditable)

makeHTMLLabel

public static javax.swing.JLabel makeHTMLLabel(java.lang.String text,
                                               int numberOfLines)

makeHTMLLabel

public static javax.swing.JLabel makeHTMLLabel(java.lang.String text,
                                               int numberOfLines,
                                               boolean hiliteRequired)

makeLabel

public static javax.swing.JLabel makeLabel(java.lang.String text,
                                           boolean hiliteRequired)

makeLabel

public static javax.swing.JLabel makeLabel(java.lang.String text,
                                           boolean hiliteRequired,
                                           java.awt.Dimension dims)

makeJButton

public static javax.swing.JButton makeJButton(java.lang.String title,
                                              java.awt.event.ActionListener actionListener)

makeJButton

public static javax.swing.JButton makeJButton(java.lang.String title,
                                              java.awt.event.ActionListener actionListener,
                                              java.awt.Dimension dims)

makeOneLineTextField

public static javax.swing.JTextField makeOneLineTextField()

makeOneLineTextField

public static javax.swing.JTextField makeOneLineTextField(java.lang.String initialValue)

addTitledBorder

public static void addTitledBorder(javax.swing.JComponent component,
                                   java.lang.String title)

makeVerticalPanel

public static javax.swing.JPanel makeVerticalPanel(int numberOfLines)

makePanel

public static javax.swing.JPanel makePanel()

makePanel

public static javax.swing.JPanel makePanel(int numberOfLines)

makeDefaultSpacer

public static java.awt.Component makeDefaultSpacer()

makeHalfSpacer

public static java.awt.Component makeHalfSpacer()

hiliteComponent

public static void hiliteComponent(javax.swing.JComponent component)

unhiliteComponent

public static void unhiliteComponent(javax.swing.JComponent component)

makeRadioPanel

public static javax.swing.JPanel makeRadioPanel(java.lang.String[] buttonsText,
                                                int selectedIndex,
                                                java.awt.event.ActionListener listener)

makeCheckBoxPanel

public static javax.swing.JPanel makeCheckBoxPanel(java.lang.String[] boxesText,
                                                   int selectedIndex,
                                                   java.awt.event.ItemListener listener)

makeCheckBox

public static javax.swing.JCheckBox makeCheckBox(java.lang.String labelStr,
                                                 boolean hiliteRequired)

makePickList

public static javax.swing.JComboBox makePickList(java.lang.String[] listValues,
                                                 boolean isEditable,
                                                 int selectedIndex,
                                                 java.awt.event.ItemListener listener)

makeList

public static CustomList makeList(java.lang.String[] colNames,
                                  java.lang.Object[] colTemplates,
                                  int displayRows,
                                  boolean showAddButton,
                                  boolean showEditButton,
                                  boolean showDuplicateButton,
                                  boolean showDeleteButton,
                                  boolean showMoveUpButton,
                                  boolean showMoveDownButton)

getDimForNumberOfLines

public static java.awt.Dimension getDimForNumberOfLines(int numberOfLines)

setPrefMaxSizes

public static void setPrefMaxSizes(javax.swing.JComponent component,
                                   java.awt.Dimension dims)

makeContainerDialog

public static javax.swing.JDialog makeContainerDialog(javax.swing.JPanel centerPanel,
                                                      java.awt.event.ActionListener okListener,
                                                      java.awt.event.ActionListener cancelListener)
Function that creates a container dialog for a given panel. The container provides the 'OK' and 'Cancel' buttons at the bottom of the container . The listeners for the 'OK' and 'Cancel' button are provided as parameters.

Parameters:
centerPanel - - the JPanel that is to displayed in this dialog
okListener - - the ActionListener for the 'OK' button
cancelListener - - the ActionListener for the 'Cancel' button
Returns:
JDialog - returns a JDialog that contains the centerPanel and a button panel at the bottom

makeContainerDialog

public static javax.swing.JDialog makeContainerDialog(javax.swing.JPanel centerPanel,
                                                      java.awt.event.ActionListener okListener,
                                                      java.awt.event.ActionListener cancelListener,
                                                      java.lang.String okCaption,
                                                      java.lang.String cancelCaption)
Function that creates a container dialog for a given panel. The container provides the 'OK' and 'Cancel' buttons at the bottom of the container . The listeners for the 'OK' and 'Cancel' button are provided as parameters. The labels for the buttons are also provided.

Parameters:
centerPanel - - the JPanel that is to displayed in this dialog
okListener - - the ActionListener for the 'OK' button
cancelListener - - the ActionListener for the 'Cancel' button
okCaption - - the label for the 'OK' button
cancelCaption - - the label for the 'Cancel' button
Returns:
JDialog - returns a JDialog that contains the centerPanel and a button panel at the bottom

makeContainerDialogNoParent

public static javax.swing.JDialog makeContainerDialogNoParent(javax.swing.JPanel centerPanel,
                                                              java.awt.event.ActionListener okListener,
                                                              java.awt.event.ActionListener cancelListener)

makeContainerDialogNoParent

public static javax.swing.JDialog makeContainerDialogNoParent(javax.swing.JPanel centerPanel,
                                                              java.awt.event.ActionListener okListener,
                                                              java.awt.event.ActionListener cancelListener,
                                                              java.lang.String okCaption,
                                                              java.lang.String cancelCaption)
Function that creates a container dialog for a given panel. The container provides the 'OK' and 'Cancel' buttons at the bottom of the container . The listeners for the 'OK' and 'Cancel' button are provided as parameters. The labels for the buttons are also provided. This 'NoParent' version creates a dialog with no parent Added so that custom unit will not have window ordering problem (Dan Higgins - 4/14/2004)

Parameters:
centerPanel - - the JPanel that is to displayed in this dialog
okListener - - the ActionListener for the 'OK' button
cancelListener - - the ActionListener for the 'Cancel' button
okCaption - - the label for the 'OK' button
cancelCaption - - the label for the 'Cancel' button
Returns:
JDialog - returns a JDialog that contains the centerPanel and a button panel at the bottom


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.