Package jmri.jmrit.beantable.signalmast
Class MatrixSignalMastAddPane.MatrixAspectPanel
java.lang.Object
jmri.jmrit.beantable.signalmast.MatrixSignalMastAddPane.MatrixAspectPanel
- Enclosing class:
- MatrixSignalMastAddPane
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
FieldsModifier and TypeFieldDescription(package private) String(package private) char[](package private) JTextField(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) JCheckBox(package private) String(package private) JPanel -
Constructor Summary
ConstructorsConstructorDescriptionMatrixAspectPanel(String aspect) Build new aspect matrix panel.MatrixAspectPanel(String aspect, char[] panelBits) Build an aspect matrix panel using char[] previously entered. -
Method Summary
Modifier and TypeMethodDescription(package private) JPanelgetPanel()Build a JPanel for an Aspect Matrix row.(package private) boolean(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[]Send the on/off positions for an Aspect to mast.(package private) voidupdateAspectBits(char[] newBits)
-
Field Details
-
disabledCheck
-
bitCheck1
-
bitCheck2
-
bitCheck3
-
bitCheck4
-
bitCheck5
-
bitCheck6
-
bitCheck7
-
bitCheck8
-
bitCheck9
-
bitCheck10
-
aspectBitsField
-
aspect
-
emptyChars
-
aspectBits
char[] aspectBits -
panel
-
-
Constructor Details
-
MatrixAspectPanel
MatrixAspectPanel(String aspect) Build new aspect matrix panel. Called when Add Signal Mast Pane is built.- Parameters:
aspect- String like "Clear"
-
MatrixAspectPanel
MatrixAspectPanel(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 Details
-
updateAspectBits
-
isAspectDisabled
boolean isAspectDisabled() -
setAspectDisabled
Set an Aspect Panels elements inactive.Invoked from Disabled (aspect) checkbox and from Edit mast pane.
- Parameters:
boo- true (On) or false (Off)
-
setBit
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:
-
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:
-
getPanel
Build a JPanel for an Aspect Matrix row.- Returns:
- JPanel to be displayed on the Add/Edit Signal Mast panel
-