gov.sns.tools.apputils.PVSelection
Class PVSelector

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--gov.sns.tools.apputils.PVSelection.PVSelector
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class PVSelector
extends javax.swing.JPanel

PVSelector is a GUI component creating a tree-like PV selection and shows the selected PV in a text box. Note this is for single selection only.

See Also:
Serialized Form

Field Summary
 javax.swing.JTextField jText
          textfield to hold selected PV name
 javax.swing.JButton slectButton
          the JButton to set slected PV or just to escape
 javax.swing.JTree tree
          the JTree to use for displaying the accelerator
 
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
PVSelector(Accelerator accel, java.lang.String label)
          The constructor.
PVSelector(java.lang.String label)
          The constructor.
 
Method Summary
 java.lang.String getLabel()
          returns the name of this PVSelector
 java.awt.event.ActionListener getPVSelectedListener(java.awt.event.ActionListener actionListenerProxy)
          method to get a PVSectedListener
 java.lang.String getPVText()
           
 Channel getSelectedChannel()
          convienience method to get selected channel
 java.lang.String getSelectedPVName()
          convienience method to get selected name
 javax.swing.JButton getSlectButton()
          returns the reference to the command button
 boolean getTreeSelectionEventListenYes()
          returns the state of the tree selection listener
 void setAccelerator(Accelerator accel)
          set an accelertor to this PVSelector
 void setLabel(java.lang.String label)
          set the name of this PVSelector
 void setPVSelectedListener(java.awt.event.ActionListener actionListenerProxy)
          method to set a PVSectedListener
 void setTreeSelectionEventListenYes(boolean treeSelectionListenerYes)
          sets the state of the tree selection listener
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

jText

public javax.swing.JTextField jText
textfield to hold selected PV name


tree

public javax.swing.JTree tree
the JTree to use for displaying the accelerator


slectButton

public javax.swing.JButton slectButton
the JButton to set slected PV or just to escape

Constructor Detail

PVSelector

public PVSelector(java.lang.String label)
The constructor. Just craete objects we need internally.

Parameters:
label - - the label to use to comment text box

PVSelector

public PVSelector(Accelerator accel,
                  java.lang.String label)
The constructor. Just craete objects we need internally.

Parameters:
accel - - The XAL accelerator object to build a tree from
label - - the label to use to comment text box
Method Detail

setAccelerator

public void setAccelerator(Accelerator accel)
set an accelertor to this PVSelector

Parameters:
accel - - the accelerator sequence

setLabel

public void setLabel(java.lang.String label)
set the name of this PVSelector


getLabel

public java.lang.String getLabel()
returns the name of this PVSelector


getTreeSelectionEventListenYes

public boolean getTreeSelectionEventListenYes()
returns the state of the tree selection listener


setTreeSelectionEventListenYes

public void setTreeSelectionEventListenYes(boolean treeSelectionListenerYes)
sets the state of the tree selection listener


getSlectButton

public javax.swing.JButton getSlectButton()
returns the reference to the command button


getSelectedPVName

public java.lang.String getSelectedPVName()
convienience method to get selected name


getSelectedChannel

public Channel getSelectedChannel()
convienience method to get selected channel


setPVSelectedListener

public void setPVSelectedListener(java.awt.event.ActionListener actionListenerProxy)
method to set a PVSectedListener


getPVSelectedListener

public java.awt.event.ActionListener getPVSelectedListener(java.awt.event.ActionListener actionListenerProxy)
method to get a PVSectedListener


getPVText

public java.lang.String getPVText()