Class MatrixSignalMastAddPane.MatrixAspectPanel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String aspect  
      (package private) char[] aspectBits  
      (package private) javax.swing.JTextField aspectBitsField  
      (package private) javax.swing.JCheckBox bitCheck1  
      (package private) javax.swing.JCheckBox bitCheck10  
      (package private) javax.swing.JCheckBox bitCheck2  
      (package private) javax.swing.JCheckBox bitCheck3  
      (package private) javax.swing.JCheckBox bitCheck4  
      (package private) javax.swing.JCheckBox bitCheck5  
      (package private) javax.swing.JCheckBox bitCheck6  
      (package private) javax.swing.JCheckBox bitCheck7  
      (package private) javax.swing.JCheckBox bitCheck8  
      (package private) javax.swing.JCheckBox bitCheck9  
      (package private) javax.swing.JCheckBox disabledCheck  
      (package private) java.lang.String emptyChars  
      (package private) javax.swing.JPanel panel  
    • Constructor Summary

      Constructors 
      Constructor Description
      MatrixAspectPanel​(java.lang.String aspect)
      Build new aspect matrix panel.
      MatrixAspectPanel​(java.lang.String aspect, char[] panelBits)
      Build an aspect matrix panel using char[] previously entered.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) javax.swing.JPanel getPanel()
      Build a JPanel for an Aspect Matrix row.
      (package private) boolean isAspectDisabled()  
      (package private) void setAspectDisabled​(boolean boo)
      Set an Aspect Panels elements inactive.
      (package private) void setBit​(int column, boolean state)
      Update the on/off positions for an Aspect in the aspectBits char[].
      (package private) char[] trimAspectBits()
      Send the on/off positions for an Aspect to mast.
      (package private) void updateAspectBits​(char[] newBits)  
      • Methods inherited from class java.lang.Object

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

      • MatrixAspectPanel

        MatrixAspectPanel​(java.lang.String aspect)
        Build new aspect matrix panel. Called when Add Signal Mast Pane is built.
        Parameters:
        aspect - String like "Clear"
      • MatrixAspectPanel

        MatrixAspectPanel​(java.lang.String aspect,
                          char[] panelBits)
        Build an aspect matrix panel using char[] previously entered. Called when number of outputs = columns is changed (possible during new mast creation only).
        Parameters:
        aspect - String like "Clear"
        panelBits - char[] of up to 5 1's and 0's
    • Method Detail

      • setAspectDisabled

        void setAspectDisabled​(boolean boo)
        Set an Aspect Panels elements inactive.

        Invoked from Disabled (aspect) checkbox and from Edit mast pane.

        Parameters:
        boo - true (On) or false (Off)
      • setBit

        void setBit​(int column,
                    boolean state)
        Update the on/off positions for an Aspect in the aspectBits char[].

        Invoked from bit checkboxes 1 to MAXMATRIXBITS on aspectPanels.

        Parameters:
        column - int of the output (between 1 and MAXMATRIXBITS)
        state - boolean for the output On (Closed) or Off (Thrown)
        See Also:
        aspectBits
      • trimAspectBits

        char[] trimAspectBits()
        Send the on/off positions for an Aspect to mast.
        Returns:
        A char[] of '1' and '0' elements with a length between 1 and 5 corresponding with the number of outputs for this mast
        See Also:
        MatrixSignalMast
      • getPanel

        javax.swing.JPanel getPanel()
        Build a JPanel for an Aspect Matrix row.
        Returns:
        JPanel to be displayed on the Add/Edit Signal Mast panel