Package moss

Class MoSSPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MoSSPanel extends JPanel
Class for a tab panel for the MoSS graphical user interface.
Since:
2007.07.07
See Also:
  • Field Details

    • BOLD

      protected static final Font BOLD
      the font for input text fields
    • SMALL

      protected static final Font SMALL
      the font for help text fields
    • LEFT

      protected static final GridBagConstraints LEFT
      the grid bag constraints for labels
    • MIDDLE

      protected static final GridBagConstraints MIDDLE
      the grid bag constraints for middle input fields
    • FILL

      protected static final GridBagConstraints FILL
      the grid bag constraints for fillers
  • Constructor Details

    • MoSSPanel

      protected MoSSPanel()
      Create a MoSS tab panel.
      Since:
      2007.02.11 (Christian Borgelt)
  • Method Details

    • add

      protected void add(Component comp, GridBagConstraints gbc)
      Add a component.
      Parameters:
      comp - the component to add
      gbc - the grid bag constraints to use
      Since:
      2007.07.07 (Christian Borgelt)
    • addHelp

      protected void addHelp(String text)
      Add a help text.
      Parameters:
      text - the help text
      Since:
      2007.07.07 (Christian Borgelt)
    • addFiller

      protected void addFiller(int height)
      Add a filler.
      Parameters:
      height - the height of the filler
      Since:
      2007.07.07 (Christian Borgelt)
    • addLabel

      protected JLabel addLabel(String text)
      Add a label to a tab.
      Parameters:
      text - the text of the label
      Returns:
      the created JLabel
      Since:
      2007.07.07 (Christian Borgelt)
    • addLabel

      protected JLabel addLabel(String text, GridBagConstraints gbc)
      Add a label to a tab.
      Parameters:
      text - the text of the label
      gbc - the grid bag constraints to use
      Returns:
      the created JLabel
      Since:
      2007.07.07 (Christian Borgelt)
    • addButton

      protected JButton addButton(String text)
      Add a button to a tab.
      Parameters:
      text - the text of the button
      Returns:
      the created JButton
      Since:
      2007.07.07 (Christian Borgelt)
    • addButton

      protected JButton addButton(String text, GridBagConstraints gbc)
      Add a button to a tab.
      Parameters:
      text - the text of the button
      gbc - the grid bag constraints to use
      Returns:
      the created JButton
      Since:
      2007.07.07 (Christian Borgelt)
    • addTextInput

      protected JTextField addTextInput(String text)
      Add a text input field to a tab.
      Parameters:
      text - the initial text of the text input field
      Returns:
      the created JTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addTextInput

      protected JTextField addTextInput(String text, GridBagConstraints gbc)
      Add a text input field to a tab.
      Parameters:
      text - the initial text of the text input field
      gbc - the grid bag constraints to use
      Returns:
      the created JTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • createNumberInput

      public static JTextField createNumberInput(String text)
      Create a number input field.
      Parameters:
      text - the initial text of the input field
      Returns:
      the created JFormattedTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addNumberInput

      protected JTextField addNumberInput(String text)
      Add a text input field to a tab.
      Parameters:
      text - the initial text of the text input field
      Returns:
      the created JFormattedTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addNumberInput

      protected JTextField addNumberInput(String text, GridBagConstraints gbc)
      Add a text input field to a tab.
      Parameters:
      text - the initial text of the text input field
      gbc - the grid bag constraints to use
      Returns:
      the created JFormattedTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addFileInput

      protected JTextField addFileInput(String text)
      Add a file input field to a tab.
      Parameters:
      text - the initial text of the file input field
      Returns:
      the created JTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addFileInput

      protected JTextField addFileInput(String text, GridBagConstraints gbc)
      Add a text input field to a tab.
      Parameters:
      text - the initial text of the file input field
      gbc - the grid bag constraints to use
      Returns:
      the created JTextField
      Since:
      2007.07.07 (Christian Borgelt)
    • addCheckBox

      protected JCheckBox addCheckBox(boolean state)
      Add a check box to a tab.
      Parameters:
      state - the initial state of the check box
      Returns:
      the created JCheckBox
      Since:
      2007.07.07 (Christian Borgelt)
    • addCheckBox

      protected JCheckBox addCheckBox(boolean state, GridBagConstraints gbc)
      Add a check box to a tab.
      Parameters:
      state - the initial state of the check box
      gbc - the grid bag constraints to use
      Returns:
      the created JCheckBox
      Since:
      2007.07.07 (Christian Borgelt)
    • addComboBox

      protected JComboBox<String> addComboBox(String[] items)
      Add a combo box to a tab.
      Parameters:
      items - the list of items
      Returns:
      the created JComboBox
      Since:
      2007.07.07 (Christian Borgelt)
    • addComboBox

      protected JComboBox<String> addComboBox(String[] items, GridBagConstraints gbc)
      Add a combo box to a tab.
      Parameters:
      items - the list of items
      gbc - the grid bag constraints to use
      Returns:
      the created JComboBox
      Since:
      2007.07.07 (Christian Borgelt)
    • addSpinner

      protected JSpinner addSpinner(int val, int min, int max, int step)
      Add a spinner to a tab.
      Parameters:
      val - the initial value
      min - the minimal value
      max - the maximal value
      step - the step size
      Returns:
      the created JSpinner
      Since:
      2007.07.07 (Christian Borgelt)
    • addSpinner

      protected JSpinner addSpinner(int val, int min, int max, int step, GridBagConstraints gbc)
      Add a combo box to a tab.
      Parameters:
      val - the initial value
      min - the minimal value
      max - the maximal value
      step - the step size
      gbc - the grid bag constraints to use
      Returns:
      the created JSpinner
      Since:
      2007.07.07 (Christian Borgelt)