Package jmri.jmrix.rps.reversealign
Class AlignmentPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.jmrix.rps.reversealign.AlignmentPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,Constants
,ReadingListener
public class AlignmentPanel extends javax.swing.JPanel implements ReadingListener, Constants
Gather RPS Readings and use them to align the detector.Note that algorithms have a bias to find transmitters with positive Z coordinates. Since we're inverting the computation between receivers and transmitters, we also flip the sign of Z coordinates to keep this bias working for us.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
AlignmentPanel.Line
Represent one line (DAQ element) of the operation-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JComboBox<java.lang.String>
algorithm
(package private) javax.swing.JButton
calc
(package private) javax.swing.JFileChooser
fci
(package private) AlignmentPanel.Line[]
lines
(package private) RpsSystemConnectionMemo
memo
(package private) java.text.NumberFormat
nf
(package private) javax.swing.JTextField
stat1
(package private) javax.swing.JTextField
stat2
(package private) javax.swing.JTextField
stat3
(package private) javax.swing.JTextField
stat4
(package private) javax.swing.JTextField
vs
(package private) javax.swing.JTextField
x1l
(package private) javax.swing.JTextField
x2l
(package private) javax.swing.JTextField
x3l
(package private) javax.swing.JTextField
x4l
(package private) javax.swing.JTextField
y1l
(package private) javax.swing.JTextField
y2l
(package private) javax.swing.JTextField
y3l
(package private) javax.swing.JTextField
y4l
(package private) javax.swing.JTextField
z1l
(package private) javax.swing.JTextField
z2l
(package private) javax.swing.JTextField
z3l
(package private) javax.swing.JTextField
z4l
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description AlignmentPanel(RpsSystemConnectionMemo _memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
calculate()
FInd x, y, z of sensors from inputs(package private) void
dummy1()
(package private) void
dummy2()
(package private) void
dummy3()
(package private) javax.vecmath.Point3d
getPoint(javax.swing.JTextField x, javax.swing.JTextField y, javax.swing.JTextField z)
Service routine for finding a Point3d from input fields(package private) Reading
getReading(int n, int index)
(package private) double
getVSound()
(package private) void
initComponents()
(package private) void
load()
void
notify(Reading r)
(package private) void
store()
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
fci
javax.swing.JFileChooser fci
-
x1l
javax.swing.JTextField x1l
-
y1l
javax.swing.JTextField y1l
-
z1l
javax.swing.JTextField z1l
-
stat1
javax.swing.JTextField stat1
-
x2l
javax.swing.JTextField x2l
-
y2l
javax.swing.JTextField y2l
-
z2l
javax.swing.JTextField z2l
-
stat2
javax.swing.JTextField stat2
-
x3l
javax.swing.JTextField x3l
-
y3l
javax.swing.JTextField y3l
-
z3l
javax.swing.JTextField z3l
-
stat3
javax.swing.JTextField stat3
-
x4l
javax.swing.JTextField x4l
-
y4l
javax.swing.JTextField y4l
-
z4l
javax.swing.JTextField z4l
-
stat4
javax.swing.JTextField stat4
-
vs
javax.swing.JTextField vs
-
nf
java.text.NumberFormat nf
-
algorithm
javax.swing.JComboBox<java.lang.String> algorithm
-
lines
AlignmentPanel.Line[] lines
-
calc
javax.swing.JButton calc
-
-
Constructor Detail
-
AlignmentPanel
public AlignmentPanel(RpsSystemConnectionMemo _memo)
-
-
Method Detail
-
initComponents
void initComponents()
-
load
void load()
-
store
void store()
-
getPoint
javax.vecmath.Point3d getPoint(javax.swing.JTextField x, javax.swing.JTextField y, javax.swing.JTextField z)
Service routine for finding a Point3d from input fields- Parameters:
x
- X coordinate of resulting pointy
- Y coordinate of resulting pointz
- Z coordinate of resulting point- Returns:
- point from coordinates
-
dummy1
void dummy1()
-
dummy2
void dummy2()
-
dummy3
void dummy3()
-
notify
public void notify(Reading r)
- Specified by:
notify
in interfaceReadingListener
-
getVSound
double getVSound()
-
calculate
void calculate()
FInd x, y, z of sensors from inputs
-
getReading
Reading getReading(int n, int index)
-
-