Package jmri.jmrit.beantable.signalmast
Class MatrixSignalMastAddPane.MatrixAspectPanel
- java.lang.Object
-
- jmri.jmrit.beantable.signalmast.MatrixSignalMastAddPane.MatrixAspectPanel
-
- Enclosing class:
- MatrixSignalMastAddPane
class MatrixSignalMastAddPane.MatrixAspectPanel extends java.lang.Object
JPanel to define properties of an Aspect for a Matrix Signal Mast.Invoked from the AddSignalMastPanel class when Output Matrix Signal Mast is selected as mast type.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Stringaspect(package private) char[]aspectBits(package private) javax.swing.JTextFieldaspectBitsField(package private) javax.swing.JCheckBoxbitCheck1(package private) javax.swing.JCheckBoxbitCheck10(package private) javax.swing.JCheckBoxbitCheck2(package private) javax.swing.JCheckBoxbitCheck3(package private) javax.swing.JCheckBoxbitCheck4(package private) javax.swing.JCheckBoxbitCheck5(package private) javax.swing.JCheckBoxbitCheck6(package private) javax.swing.JCheckBoxbitCheck7(package private) javax.swing.JCheckBoxbitCheck8(package private) javax.swing.JCheckBoxbitCheck9(package private) javax.swing.JCheckBoxdisabledCheck(package private) java.lang.StringemptyChars(package private) javax.swing.JPanelpanel
-
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.JPanelgetPanel()Build a JPanel for an Aspect Matrix row.(package private) booleanisAspectDisabled()(package private) voidsetAspectDisabled(boolean boo)Set an Aspect Panels elements inactive.(package private) voidsetBit(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) voidupdateAspectBits(char[] newBits)
-
-
-
Field Detail
-
disabledCheck
javax.swing.JCheckBox disabledCheck
-
bitCheck1
javax.swing.JCheckBox bitCheck1
-
bitCheck2
javax.swing.JCheckBox bitCheck2
-
bitCheck3
javax.swing.JCheckBox bitCheck3
-
bitCheck4
javax.swing.JCheckBox bitCheck4
-
bitCheck5
javax.swing.JCheckBox bitCheck5
-
bitCheck6
javax.swing.JCheckBox bitCheck6
-
bitCheck7
javax.swing.JCheckBox bitCheck7
-
bitCheck8
javax.swing.JCheckBox bitCheck8
-
bitCheck9
javax.swing.JCheckBox bitCheck9
-
bitCheck10
javax.swing.JCheckBox bitCheck10
-
aspectBitsField
javax.swing.JTextField aspectBitsField
-
aspect
java.lang.String aspect
-
emptyChars
java.lang.String emptyChars
-
aspectBits
char[] aspectBits
-
panel
javax.swing.JPanel panel
-
-
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
-
updateAspectBits
void updateAspectBits(char[] newBits)
-
isAspectDisabled
boolean isAspectDisabled()
-
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
-
-