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) classAlignmentPanel.LineRepresent 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.JButtoncalc(package private) javax.swing.JFileChooserfci(package private) AlignmentPanel.Line[]lines(package private) RpsSystemConnectionMemomemo(package private) java.text.NumberFormatnf(package private) javax.swing.JTextFieldstat1(package private) javax.swing.JTextFieldstat2(package private) javax.swing.JTextFieldstat3(package private) javax.swing.JTextFieldstat4(package private) javax.swing.JTextFieldvs(package private) javax.swing.JTextFieldx1l(package private) javax.swing.JTextFieldx2l(package private) javax.swing.JTextFieldx3l(package private) javax.swing.JTextFieldx4l(package private) javax.swing.JTextFieldy1l(package private) javax.swing.JTextFieldy2l(package private) javax.swing.JTextFieldy3l(package private) javax.swing.JTextFieldy4l(package private) javax.swing.JTextFieldz1l(package private) javax.swing.JTextFieldz2l(package private) javax.swing.JTextFieldz3l(package private) javax.swing.JTextFieldz4l-
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) voidcalculate()FInd x, y, z of sensors from inputs(package private) voiddummy1()(package private) voiddummy2()(package private) voiddummy3()(package private) javax.vecmath.Point3dgetPoint(javax.swing.JTextField x, javax.swing.JTextField y, javax.swing.JTextField z)Service routine for finding a Point3d from input fields(package private) ReadinggetReading(int n, int index)(package private) doublegetVSound()(package private) voidinitComponents()(package private) voidload()voidnotify(Reading r)(package private) voidstore()-
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:
notifyin interfaceReadingListener
-
getVSound
double getVSound()
-
calculate
void calculate()
FInd x, y, z of sensors from inputs
-
getReading
Reading getReading(int n, int index)
-
-