Class GuiBuilder

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener

    public class GuiBuilder
    extends java.lang.Object
    implements java.awt.event.ActionListener
    Provides methods for quickly building panel components. I can think of many other (better) ways to do this, but for the ImageJ port this works well for now.
    Author:
    senseneyj
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      javax.swing.JButton buildButton​(java.lang.String text)  
      javax.swing.JCheckBox buildCheckBox​(java.lang.String label, boolean selected)  
      javax.swing.JComboBox buildComboBox​(java.lang.String labelText, java.lang.Object[] options)  
      javax.swing.JComboBox buildComboBox​(java.lang.String labelText, java.lang.Object[] options, int numDefault)  
      javax.swing.JTextField buildDecimalField​(java.lang.String labelText, double initNum)  
      javax.swing.JTextField buildField​(java.lang.String labelText, java.lang.String initText)  
      javax.swing.JTextField buildFileField​(java.lang.String labelText, java.lang.String initText, boolean multiSelect, int fileSelectionMode)  
      javax.swing.JTextField buildFileField​(java.lang.String labelText, java.lang.String initText, boolean multiSelect, int fileSelectionMode, boolean createNewFiles)  
      javax.swing.JTextField buildFileField​(java.lang.String labelText, java.lang.String initText, boolean multiSelect, int fileSelectionMode, boolean createNewFiles, java.awt.event.ActionListener updateAction)  
      javax.swing.JTextField buildFileField​(java.lang.String labelText, java.lang.String initText, boolean multiSelect, int fileSelectionMode, java.awt.event.ActionListener updateAction)  
      javax.swing.JTextField buildIntegerField​(java.lang.String labelText, int initNum)  
      javax.swing.JPanel buildOKCancelPanel()  
      javax.swing.JPasswordField buildPasswordField​(java.lang.String labelText, java.lang.String initText)  
      javax.swing.JRadioButton buildRadioButton​(java.lang.String label, boolean selected)  
      ViewJSlider buildSlider​(java.lang.String labelText, int initValue, java.lang.String mode)  
      ExitStatus getExitStatus()  
      java.awt.event.ActionListener[] getListenerList()  
      boolean getSuccess()  
      private static void initGB()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • listenerList

        private java.util.ArrayList<java.awt.event.ActionListener> listenerList
      • passedListeners

        private boolean passedListeners
      • gbc

        private static java.awt.GridBagConstraints gbc
      • gbLayout

        private static java.awt.GridBagLayout gbLayout
    • Constructor Detail

      • GuiBuilder

        public GuiBuilder​(JDialogBase parent)
    • Method Detail

      • getExitStatus

        public ExitStatus getExitStatus()
      • getSuccess

        public boolean getSuccess()
      • initGB

        private static void initGB()
      • getListenerList

        public java.awt.event.ActionListener[] getListenerList()
      • buildRadioButton

        public javax.swing.JRadioButton buildRadioButton​(java.lang.String label,
                                                         boolean selected)
      • buildCheckBox

        public javax.swing.JCheckBox buildCheckBox​(java.lang.String label,
                                                   boolean selected)
      • buildField

        public javax.swing.JTextField buildField​(java.lang.String labelText,
                                                 java.lang.String initText)
      • buildPasswordField

        public javax.swing.JPasswordField buildPasswordField​(java.lang.String labelText,
                                                             java.lang.String initText)
      • buildFileField

        public javax.swing.JTextField buildFileField​(java.lang.String labelText,
                                                     java.lang.String initText,
                                                     boolean multiSelect,
                                                     int fileSelectionMode)
      • buildFileField

        public javax.swing.JTextField buildFileField​(java.lang.String labelText,
                                                     java.lang.String initText,
                                                     boolean multiSelect,
                                                     int fileSelectionMode,
                                                     java.awt.event.ActionListener updateAction)
      • buildFileField

        public javax.swing.JTextField buildFileField​(java.lang.String labelText,
                                                     java.lang.String initText,
                                                     boolean multiSelect,
                                                     int fileSelectionMode,
                                                     boolean createNewFiles)
      • buildFileField

        public javax.swing.JTextField buildFileField​(java.lang.String labelText,
                                                     java.lang.String initText,
                                                     boolean multiSelect,
                                                     int fileSelectionMode,
                                                     boolean createNewFiles,
                                                     java.awt.event.ActionListener updateAction)
      • buildIntegerField

        public javax.swing.JTextField buildIntegerField​(java.lang.String labelText,
                                                        int initNum)
      • buildDecimalField

        public javax.swing.JTextField buildDecimalField​(java.lang.String labelText,
                                                        double initNum)
      • buildSlider

        public ViewJSlider buildSlider​(java.lang.String labelText,
                                       int initValue,
                                       java.lang.String mode)
      • buildComboBox

        public javax.swing.JComboBox buildComboBox​(java.lang.String labelText,
                                                   java.lang.Object[] options)
      • buildComboBox

        public javax.swing.JComboBox buildComboBox​(java.lang.String labelText,
                                                   java.lang.Object[] options,
                                                   int numDefault)
      • buildOKCancelPanel

        public javax.swing.JPanel buildOKCancelPanel()
      • buildButton

        public javax.swing.JButton buildButton​(java.lang.String text)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener