PIRL.Viewers

## Class Parameter_Pane

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JPanel
        - - PIRL.Viewers.Parameter_Pane

All Implemented Interfaces:
  ImageObserver, MenuContainer, Serializable, Accessible

    public class Parameter_Pane
    extends JPanel

A Parameter_Pane provides a graphical view of a Parameter.

The display uses a Parameter_Model to wrap the Parameter data and a JTreeTable controller to represent the Parameters and its Values in two columns. Any Parameter that is an aggregate of other Parameters may be expanded to display its contents. The name of each Parameter is listed in the first column of the table. In the second column the Parameter's Value is shown as the String provided by the Value's `toString` method. Those Values that are array types (`SET` or `SEQUENCE`) may be shown in various display `modes`.

See Also:
  `Parameter`, `Value`, `JTreeTable`, Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class javax.swing.JPanel

`JPanel.AccessibleJPanel`

### Nested classes/interfaces inherited from class javax.swing.JComponent

`JComponent.AccessibleJComponent`

### Nested classes/interfaces inherited from class java.awt.Container

`Container.AccessibleAWTContainer`

### Nested classes/interfaces inherited from class java.awt.Component

`Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

### Field Summary

Fields
`protected int` `Array_Viewing_Mode` Current Array Value viewing mode.
`static int` `CSV_ARRAY_VIEWING` Array Value elements are viewed as comma separated values (CSV) text.
`static int` `Default_Array_Viewing_Mode` The default Array Value viewing mode.
`static String` `Default_Line_Style` Default tree line style.
`static int` `MULTIPLE_WINDOW_ARRAY_VIEWING` Array Value elements are viewed in multiple separate windows.
`static int` `SUBTREE_ARRAY_VIEWING` Array Value elements are viewed in a scrollable subtree cell pane.
`protected JTreeTable` `The_TreeTable` The JTreeTable used to view the Parameter.
`static int` `WINDOW_ARRAY_VIEWING` Array Value elements are viewed in a separate window.

### 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

Constructors
Constructor and Description
`Parameter_Pane(Parameter parameter)` Creates a Parameter_Pane from the specified Parameter.

### Method Summary

Methods
`JMenu` `Array_Values_Menu()` Get the menu that controls how Array Values are viewed.
`int` `Array_Viewing_Mode()` Gets the Array Value viewing mode.
`Parameter_Pane` `Array_Viewing_Mode(int mode)` Sets the Array Value viewing mode.
`void` `Last_Value_Path_Expanded(TreePath last_path_expanded)` Sets the path to the last value expanded.
`String` `Line_Style()` Gets the "JTree.lineStyle" property currently being used.
`Parameter_Pane` `Line_Style(String style)` Sets the "JTree.lineStyle" property to the specified style.
`static void` `main(String[] arguments)`
`Parameter` `Parameter()` Gets the Parameter being viewed in the display.
`Parameter_Pane` `Parameter(Parameter parameter)` Sets the Parameter to be viewed.
`void` `Refresh()` Refresh the view.
`void` `Take_Down_Value_Views()` Any windows displaying Array Values are taken down.
`protected JTreeTable` `Tree_Table(PIRL.Viewers.Parameter_Pane.Parameter_Model model)` Creates the JTreeTable that will display the Parameter's name and Value.
`JTreeTable` `TreeTable()` Gets the JTreeTable being used to view the Parameter in the display.

### 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, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### CSV_ARRAY_VIEWING

    public static final int CSV_ARRAY_VIEWING

Array Value elements are viewed as comma separated values (CSV) text.

See Also:
  Constant Field Values

#### SUBTREE_ARRAY_VIEWING

    public static final int SUBTREE_ARRAY_VIEWING

Array Value elements are viewed in a scrollable subtree cell pane.

See Also:
  Constant Field Values

#### WINDOW_ARRAY_VIEWING

    public static final int WINDOW_ARRAY_VIEWING

Array Value elements are viewed in a separate window.

See Also:
  Constant Field Values

#### MULTIPLE_WINDOW_ARRAY_VIEWING

    public static final int MULTIPLE_WINDOW_ARRAY_VIEWING

Array Value elements are viewed in multiple separate windows.

See Also:
  Constant Field Values

#### Default_Array_Viewing_Mode

    public static int Default_Array_Viewing_Mode

The default Array Value viewing mode.

#### Array_Viewing_Mode

    protected int Array_Viewing_Mode

Current Array Value viewing mode.

#### Default_Line_Style

    public static String Default_Line_Style

Default tree line style.

#### The_TreeTable

    protected JTreeTable The_TreeTable

The JTreeTable used to view the Parameter.

### Constructor Detail

#### Parameter_Pane

    public Parameter_Pane(Parameter parameter)

Creates a Parameter_Pane from the specified Parameter.

Parameters:
  `parameter` - The Parameter to be displayed.

### Method Detail

#### Parameter

    public Parameter_Pane Parameter(Parameter parameter)

Sets the Parameter to be viewed.

N.B.: If the Name of the Parameter is the `Parser.CONTAINER_NAME` then the root node will not be displayed.

Parameters:
  `parameter` - The Parameter to View.
Returns:
  This Parameter_Pane.

#### Parameter

    public Parameter Parameter()

Gets the Parameter being viewed in the display.

Returns:
  The Parameter viewed in this Parameter_View.

#### Line_Style

    public String Line_Style()

Gets the "JTree.lineStyle" property currently being used.

Returns:
  The "JTree.lineStyle" property String in effect.

#### Line_Style

    public Parameter_Pane Line_Style(String style)

Sets the "JTree.lineStyle" property to the specified style.

Parameters:
  `style` - The String describing the style to use.
Returns:
  This Parameter_Pane.
See Also:
  `JComponent.putClientProperty(Object, Object)`

#### TreeTable

    public JTreeTable TreeTable()

Gets the JTreeTable being used to view the Parameter in the display.

Returns:
  The JTreeTable viewed in this Parameter_View.

#### Array_Viewing_Mode

    public int Array_Viewing_Mode()

Gets the Array Value viewing mode.

Returns:
  The Value Array viewing mode. This will be one of `CSV_ARRAY_VIEWING`, `SUBTREE_ARRAY_VIEWING`, `WINDOW_ARRAY_VIEWING`, or `MULTIPLE_WINDOW_ARRAY_VIEWING`.

#### Array_Viewing_Mode

    public Parameter_Pane Array_Viewing_Mode(int mode)

Sets the Array Value viewing mode.

The current view will be redisplayed as appropriate.

Parameters:
  `mode` - The Value Array viewing mode. This should be one of `CSV_ARRAY_VIEWING`, `SUBTREE_ARRAY_VIEWING`, or `WINDOW_ARRAY_VIEWING`. A value less than 0 will be set to 0; a value greater than `MULTIPLE_WINDOW_ARRAY_VIEWING` will be set to `MULTIPLE_WINDOW_ARRAY_VIEWING`.
Returns:
  This Parameter_Pane.

#### Last_Value_Path_Expanded

    public void Last_Value_Path_Expanded(TreePath last_path_expanded)

Sets the path to the last value expanded.

NOT FOR PUB USE!

N.B.: This method is an implementation artifact that is only for use by a Value_Pane created by this Parameter_Pane.

Parameters:
  `last_path_expanded` - The TreePath for the last expanded Array Value row.

#### Refresh

    public void Refresh()

Refresh the view.

Any change to the `array viewing mode` is applied.

#### Tree_Table

    protected JTreeTable Tree_Table(PIRL.Viewers.Parameter_Pane.Parameter_Model model)

Creates the JTreeTable that will display the Parameter's name and Value.

The JTreeTable is constructed using the specified Parameter_Model.

A ListSelectionListener is provided for the JTreeTable that will create a Value_View when a row in the table is selected that contains an Array Value.

The Value_View displays that are being viewed are maintained in the Value_Views Hashtable. When the Array_Viewing_Mode is WINDOW_ARRAY_VIEWING any Value_View for a non-selected Value is disposed of. If the Array_Viewing_Mode is MULTIPLE_WINDOW_ARRAY_VIEWING and a previously selected Value has a `Value_Views` entry, then that display is flashed with a Blinker to bring attention to the reselected Value display.

Parameters:
  `model` - The Parameter_Model to use in constructing the JTreeTable.
Returns:
  The JTreeTable that was created.

#### Take_Down_Value_Views

    public void Take_Down_Value_Views()

Any windows displaying Array Values are taken down.

#### Array_Values_Menu

    public JMenu Array_Values_Menu()

Get the menu that controls how Array Values are viewed.

Returns:
  The Array Values JMenu.

#### main

    public static void main(String[] arguments)