|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
faa.tg.util.gui.awt.DraggableJPanel
faa.tg.util.aircraftViewer.FieldPanel
public class FieldPanel
This class is a gui representation of any field (if not by using accessor method, than by using toString) More specifically it is a JPanel that contains a label which is the name of the field(the accessor method - "get"), a label containing the value of the field, if the field is an instance of AMeasure a combo box of the units that the value can be displayed in, and if the value can be converted into a Double, a button which if pressed displays a StripChart that will also display the field's value.
| Nested Class Summary |
|---|
| 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 |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private java.awt.Color |
backColor
|
private javax.swing.JPanel |
buttonPanel
|
private javax.swing.JButton |
chartButton
|
private javax.swing.JFrame |
chartFrame
|
private javax.swing.JComboBox |
comboBox
|
static java.lang.String |
CVS_VERSION_ID
CVS Version |
private static java.awt.Font |
DEFAULT_FONT
|
private StripChartDockManager |
dockMgr
|
private javax.swing.JLabel |
field
|
private java.lang.String |
fieldName
|
private FieldPanelPreferences |
fieldPanelPrefs
|
private AircraftInformation |
lastAcInfo
|
private MethodChain |
methodChain
|
private java.lang.String |
selectedUnits
|
(package private) static long |
serialVersionUID
|
private StripChartComponent |
ssc
|
private boolean |
stripChartVisible
|
private javax.swing.JLabel |
value
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
FieldPanel(MethodChain methodChain)
Constructor - creates two JLabels, a drop down of the Unit_type, and a button |
|
FieldPanel(MethodChain methodChain,
java.lang.String units)
Constructor |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent action)
When comboBox gets changed, reset the value displayed to reflect this using the last AircraftInformation recieved. |
void |
clear()
Clears all the values that are currently being displayed |
private void |
clearStripChart()
Clears all the values that are currently being displayed on the StripChart |
private void |
createStripChart()
Creates and shows a new frame with the StripChartComponent already defined and with the title as this field's name and the acid for which it is being displayed |
javax.swing.JFrame |
createStripChart(java.lang.String title,
java.awt.Point location,
java.awt.Dimension size,
FieldPanelPreferences panelPrefs)
Creates and returns a new frame containing a StripChartComponent with the given StripChart preferences and given title |
StripChartPreferences |
getChartPreferences()
gets the strip chart preferences for this field |
java.lang.String |
getFieldName()
Returns the name of the field the panel is for |
MethodChain |
getMethodChain()
Returns the MethodChain used to retrieve the value of this field |
java.lang.String |
getTitle()
Returns the title of this field currently displayed (the accessor method minus "get"). |
java.lang.String |
getValue()
Returns the value currently being displayed as a String |
void |
hideStripChart()
disposes of the strip chart frame |
void |
hideStripChartButton()
Takes the StripChart button off of the display |
private void |
makeComboBox()
Creates a comboBox filled with AUnits that this.value can be displayed in, adds it to this frame and adds this as an ActionListener |
private void |
makePanel()
Populates this panel with the title and "" until a value has been received |
private void |
makeStripChartButton()
Creates a button for the "Strip Chart", adds it to this panel, and adds this as an ActionListener |
void |
setBackground(int color)
Sets the background one of two colors. |
void |
setSCDockManager(StripChartDockManager manager)
Sets the StripChartDockManager |
void |
showStripChart()
displays the strip chart frame |
java.lang.String |
toString()
|
void |
updateValue(AircraftInformation acInfo)
Sets the value, combo box and stripChart (if applicable) to the values that are specified in the given AircraftState by invoking this.methodChain |
| Methods inherited from class faa.tg.util.gui.awt.DraggableJPanel |
|---|
drawLineOnBottom, drawLineOnTop, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, reset, select |
| 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
private java.awt.Color backColor
private javax.swing.JLabel field
private javax.swing.JLabel value
private javax.swing.JPanel buttonPanel
private javax.swing.JComboBox comboBox
private java.lang.String selectedUnits
private javax.swing.JButton chartButton
private MethodChain methodChain
private AircraftInformation lastAcInfo
private StripChartComponent ssc
private javax.swing.JFrame chartFrame
private FieldPanelPreferences fieldPanelPrefs
private StripChartDockManager dockMgr
private static java.awt.Font DEFAULT_FONT
private boolean stripChartVisible
private java.lang.String fieldName
| Constructor Detail |
|---|
public FieldPanel(MethodChain methodChain,
java.lang.String units)
methodChain - - methodChain the chain of methods to
call to get valueunits - - the units to usepublic FieldPanel(MethodChain methodChain)
methodChain - the chain of methods to call to get value| Method Detail |
|---|
public java.lang.String getFieldName()
public void hideStripChartButton()
private void makePanel()
public java.lang.String getValue()
public void setBackground(int color)
color - color desired - if 0 color is LIGHT_GRAY otherwise its GRAYpublic MethodChain getMethodChain()
public java.lang.String getTitle()
private void clearStripChart()
public void clear()
public void setSCDockManager(StripChartDockManager manager)
private void makeStripChartButton()
private void makeComboBox()
public void updateValue(AircraftInformation acInfo)
acInfo - state to update this panel withpublic void actionPerformed(java.awt.event.ActionEvent action)
actionPerformed in interface java.awt.event.ActionListenerpublic void showStripChart()
public void hideStripChart()
public java.lang.String toString()
toString in class java.awt.Componentpublic StripChartPreferences getChartPreferences()
private void createStripChart()
public javax.swing.JFrame createStripChart(java.lang.String title,
java.awt.Point location,
java.awt.Dimension size,
FieldPanelPreferences panelPrefs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||