org.jlab.coda.afecs.ui.rcgui
Class RcUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.jlab.coda.afecs.ui.rcgui.RcUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListSelectionListener, javax.swing.event.TreeSelectionListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class RcUI
extends javax.swing.JFrame
implements javax.swing.event.TreeSelectionListener, javax.swing.event.ListSelectionListener

JSA: Thomas Jefferson National Accelerator Facility
This software was developed under a United States Government license,
described in the NOTICE file included as part of this distribution.
Copyright (c), Aug 18, 2009

See Also:
Serialized Form

Nested Class Summary
 class RcUI.LifeLineT
          ********************************************************************** Thread checking if we are connected to the platform **********************************************************************
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
 java.util.concurrent.atomic.AtomicBoolean AbortRequest
           
 long absolutTl
           
 java.lang.String afecsHome
           
 java.lang.String agentsSRType
           
 int AIV
           
 boolean autoMode
           
 double[] bGdata
           
 org.jlab.coda.afecs.ui.rcgui.RcUI.GUpdateThread chartUpdateSwingThread
           
 CommandLine cl
           
 ATreeFactory componentTreeFactory
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogAgents
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogControlD
           
 ATableFactory dalogTableFactory
           
 int dalogTableHistory
           
 ACosiTimeChart DataRateTG
           
 ATableFactory dataTableFactory
           
 java.util.concurrent.atomic.AtomicBoolean dialog_is_up
           
 org.jlab.coda.cchart.jas.H1D DrBg
           
 int el
           
 ACosiTimeChart EvtRateTG
           
 java.util.concurrent.atomic.AtomicBoolean GActive
           
 java.util.Map<java.lang.String,AAgentData> graphingCompList
           
 boolean help
           
 RcUI iam
           
 ATableFactory individualCompDataTableFactory
           
 boolean isComponentTBActive
           
 boolean isMulticast
           
 java.util.concurrent.atomic.AtomicBoolean isSTRun
           
 ACosiTimeChart LiveTimeTG
           
 ABase me
           
 java.lang.String monitoredComponent
           
 java.util.Map<java.lang.String,java.lang.Integer> msgReportingRutypes
           
 java.util.Map<java.lang.String,AComponent> myComponents
           
 java.lang.Integer[] platformConfigColors
           
 java.lang.String[] platformConfigs
           
 java.lang.String previousState
           
 java.util.Map<java.lang.String,AAgentData> reportingCompDataMap
           
 java.util.concurrent.atomic.AtomicBoolean ResetRequest
           
 java.lang.String rootNodeName
           
 java.lang.String selectedComponent
           
 java.text.SimpleDateFormat startendFormater
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle statusAgents
           
 java.lang.String supervisorSRType
           
 long tl
           
 java.util.Map<java.lang.String,AAgentData> tsCompList
           
 boolean TSLiveTimeGraphCreated
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle uiControl
           
 java.lang.String UIMulticastUDL
           
 int waitForConfigure
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RcUI(CommandLine c)
          Constructor
 
Method Summary
 java.lang.String defineWatch(java.util.Map<java.lang.String,AComponent> map)
          Asks supervisor agent to report currently registered componennts, and returns the name of the ER or EB/CDEB or ROC component.
 void popupInfoDialog(java.lang.String message)
          Pops up a dialog box with the message
 java.lang.String popupInputDialog(java.lang.String message)
          Pops up a dialog box asking to enter some input/info
 int popupQuestionDialog(java.lang.String message, java.lang.String[] buttonTexts)
          Pops up a dialog box with the a question.
 int popupResetDialog()
          Pops up a dialog box with three buttons: reset, abort, cancel
 void rcResetRequest()
          Starts a swing worker to submit reset request and configure GUI accordingly
 int[] setAndGetRunNumbers(java.lang.String isCoda2DB, int newRunNumber)
          Method is used by SetRNCQL and SetRNCool classes that interract with the user to get/set run number
 void startConfig()
           
 void updateControlButtons()
          Based on RunStateTextFiled value enables/desiables control buttons
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          This is called when component name on the table is clicked
 void valueChanged(javax.swing.event.TreeSelectionEvent event)
          This is called when component on the tree is clicked.
 boolean waitConfigureSucceed()
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

me

public ABase me

dalogTableHistory

public int dalogTableHistory

rootNodeName

public java.lang.String rootNodeName

componentTreeFactory

public ATreeFactory componentTreeFactory

dalogTableFactory

public ATableFactory dalogTableFactory

dataTableFactory

public ATableFactory dataTableFactory

individualCompDataTableFactory

public ATableFactory individualCompDataTableFactory

GActive

public java.util.concurrent.atomic.AtomicBoolean GActive

isSTRun

public java.util.concurrent.atomic.AtomicBoolean isSTRun

autoMode

public boolean autoMode

uiControl

public org.jlab.coda.cMsg.cMsgSubscriptionHandle uiControl

dalogAgents

public org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogAgents

dalogControlD

public org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogControlD

statusAgents

public org.jlab.coda.cMsg.cMsgSubscriptionHandle statusAgents

ResetRequest

public java.util.concurrent.atomic.AtomicBoolean ResetRequest

AbortRequest

public java.util.concurrent.atomic.AtomicBoolean AbortRequest

selectedComponent

public volatile java.lang.String selectedComponent

monitoredComponent

public volatile java.lang.String monitoredComponent

el

public int el

tl

public long tl

absolutTl

public long absolutTl

EvtRateTG

public ACosiTimeChart EvtRateTG

DataRateTG

public ACosiTimeChart DataRateTG

DrBg

public org.jlab.coda.cchart.jas.H1D DrBg

bGdata

public double[] bGdata

LiveTimeTG

public ACosiTimeChart LiveTimeTG

myComponents

public java.util.Map<java.lang.String,AComponent> myComponents

tsCompList

public java.util.Map<java.lang.String,AAgentData> tsCompList

graphingCompList

public java.util.Map<java.lang.String,AAgentData> graphingCompList

reportingCompDataMap

public java.util.Map<java.lang.String,AAgentData> reportingCompDataMap

chartUpdateSwingThread

public org.jlab.coda.afecs.ui.rcgui.RcUI.GUpdateThread chartUpdateSwingThread

AIV

public volatile int AIV

previousState

public java.lang.String previousState

platformConfigs

public java.lang.String[] platformConfigs

platformConfigColors

public java.lang.Integer[] platformConfigColors

dialog_is_up

public java.util.concurrent.atomic.AtomicBoolean dialog_is_up

TSLiveTimeGraphCreated

public boolean TSLiveTimeGraphCreated

agentsSRType

public java.lang.String agentsSRType

supervisorSRType

public java.lang.String supervisorSRType

afecsHome

public java.lang.String afecsHome

isMulticast

public boolean isMulticast

UIMulticastUDL

public java.lang.String UIMulticastUDL

iam

public RcUI iam

cl

public CommandLine cl

help

public boolean help

isComponentTBActive

public boolean isComponentTBActive

startendFormater

public java.text.SimpleDateFormat startendFormater

waitForConfigure

public int waitForConfigure

msgReportingRutypes

public java.util.Map<java.lang.String,java.lang.Integer> msgReportingRutypes
Constructor Detail

RcUI

public RcUI(CommandLine c)
Constructor

Parameters:
c - CommandLine object reference, contains command-line/xml defined variables.
Method Detail

startConfig

public void startConfig()

rcResetRequest

public void rcResetRequest()
Starts a swing worker to submit reset request and configure GUI accordingly


defineWatch

public java.lang.String defineWatch(java.util.Map<java.lang.String,AComponent> map)
Asks supervisor agent to report currently registered componennts, and returns the name of the ER or EB/CDEB or ROC component.

Returns:
the name of the component to be watched

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent event)
This is called when component on the tree is clicked.

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener
Parameters:
event - TreeSelection event object

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
This is called when component name on the table is clicked

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - List Selection event

popupInfoDialog

public void popupInfoDialog(java.lang.String message)
Pops up a dialog box with the message

Parameters:
message - text

popupQuestionDialog

public int popupQuestionDialog(java.lang.String message,
                               java.lang.String[] buttonTexts)
Pops up a dialog box with the a question.

Parameters:
message - text
buttonTexts - texts of buttons
Returns:
int = JOptionPane.YES_OPTION or JOptionPane.NO_OPTION

popupResetDialog

public int popupResetDialog()
Pops up a dialog box with three buttons: reset, abort, cancel

Returns:
int indicating button celection

popupInputDialog

public java.lang.String popupInputDialog(java.lang.String message)
Pops up a dialog box asking to enter some input/info

Parameters:
message - text
Returns:
String = input text or null in case user clicked cancel button

waitConfigureSucceed

public boolean waitConfigureSucceed()

updateControlButtons

public void updateControlButtons()
Based on RunStateTextFiled value enables/desiables control buttons


setAndGetRunNumbers

public int[] setAndGetRunNumbers(java.lang.String isCoda2DB,
                                 int newRunNumber)
Method is used by SetRNCQL and SetRNCool classes that interract with the user to get/set run number

Parameters:
newRunNumber -
Returns: