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

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.CodaRcGui
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 CodaRcGui
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
 
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
 int _runNumber
           
 java.lang.String _runState
           
 java.lang.String _runType
           
 java.lang.String _session
           
 java.lang.String _supervisorName
           
 java.util.concurrent.atomic.AtomicBoolean AbortRequest
           
 long absolutTl
           
 java.lang.String afecsHome
           
 java.lang.String agentsSRType
           
 int AIV
           
 boolean autoMode
           
 double[] bGdata
           
 CommandLine cl
           
 RcMsgHeartBeat cMsgConHB
           
 ATreeFactory componentTreeFactory
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogAgents
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle dalogControlD
           
 ATableFactory dalogTableFactory
           
 int dalogTableHistory
           
 ACosiTimeChart DataRateTG
           
 ATableFactory dataTableFactory
           
 java.lang.String[] dbConfigs
           
 DbDriver dbDriver
           
 java.lang.String[] dbSessions
           
 java.util.concurrent.atomic.AtomicBoolean dialog_is_up
           
 org.jlab.coda.cchart.jas.H1D DrBg
           
 int eventLimit
           
 ACosiTimeChart EvtRateTG
           
 java.util.concurrent.atomic.AtomicBoolean GActive
           
 GuiDriver gDriver
           
 java.util.Map<java.lang.String,AAgentData> graphingCompList
           
 RcGraphUpdate gUpdateThread
           
 boolean help
           
 CodaRcGui 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.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> platformDocs
           
 java.util.concurrent.ConcurrentHashMap<java.lang.String,ASessionInfo> platformSessions
           
 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 startEndFormatter
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle statusAgents
           
 java.lang.String supervisorSRSubject
           
 java.lang.String supervisorSRType
           
 long timeLimit
           
 java.util.Map<java.lang.String,AAgentData> tsCompList
           
 boolean TSLiveTimeGraphCreated
           
 org.jlab.coda.cMsg.cMsgSubscriptionHandle uiControl
           
 java.lang.String UIMulticastUDL
           
 
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
CodaRcGui(CommandLine c)
          Constructor
 
Method Summary
 void _bgRemove()
           
 void _clearCompTree()
           
 void _clearLocalDB()
           
 void _clearTables()
           
 void _createNewGraphs()
          recreates graphs
 void _tgClear()
          Clears time graphs
 void _tgCreateSelectedCompDM()
          Create and add data model for selected components.
 void _tgReset()
           
 void addRemoveSelected2Graph(boolean add)
          Adds/removes the selected component to the graphingCompList map for graphing in the charts
 java.lang.String defineWatch(java.util.Map<java.lang.String,AComponent> map)
          Asks supervisor agent to report currently registered components, and returns the name of the ER or EB/CDEB or ROC component.
 boolean doSubscriptions()
          RcUI basic subscriptions
 org.jlab.coda.afecs.ui.rcgui.CodaRcGui.NewSessionAction getAction22()
           
 javax.swing.JMenu getConfigMenu()
           
 javax.swing.JTextField getConfigurationTextField()
           
 javax.swing.JButton getConfigureButton()
           
 javax.swing.JMenuItem getConnectMenuItem()
           
 javax.swing.JMenuItem getCoolMenuItem()
           
 javax.swing.JLabel getDateLabel()
           
 javax.swing.JMenuItem getDisconnectMenuItem()
           
 javax.swing.JButton getDownloadButton()
           
 javax.swing.JButton getEndButton()
           
 javax.swing.JTextField getEndTimeTextField()
           
 javax.swing.JTextField getEventNumberTextField()
           
 javax.swing.JTextField getExpidTextField()
           
 javax.swing.JButton getGoButton()
           
 javax.swing.JTabbedPane getGraph1()
           
 javax.swing.JMenu getHelpMenu()
           
 javax.swing.JTextField getMonitorCompTextField()
           
 javax.swing.JTextField getOutputFileTextField()
           
 javax.swing.JButton getPauseButton()
           
 javax.swing.JButton getPrestartButton()
           
 javax.swing.JMenuItem getReleaseComponentMenuItem()
           
 javax.swing.JButton getResetButton()
           
 javax.swing.JTextField getRunNumberTextField()
           
 javax.swing.JPanel getRunStatePanel()
           
 javax.swing.JTextField getRunStateTextField()
           
 javax.swing.JMenu getSessionMenu()
           
 javax.swing.JTextField getSessionTextField()
           
 javax.swing.JButton getStartButton()
           
 javax.swing.JTextField getStartTimeTextField()
           
 javax.swing.JLabel getStatusLabel()
           
 void hardResetCharts()
          Recreates graphs in the charts, by removing and adding graphs to the appropriate charts.
 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
 boolean un_Subscribe()
           
 void updateDaLogTable(java.lang.String name, java.lang.String txt, java.lang.String severity, int severityId)
          local update of the daLog table
 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.
 
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

eventLimit

public int eventLimit

timeLimit

public long timeLimit

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

AIV

public volatile int AIV

previousState

public java.lang.String previousState

platformConfigs

public java.lang.String[] platformConfigs

platformConfigColors

public java.lang.Integer[] platformConfigColors

platformSessions

public java.util.concurrent.ConcurrentHashMap<java.lang.String,ASessionInfo> platformSessions

platformDocs

public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> platformDocs

dbConfigs

public java.lang.String[] dbConfigs

dbSessions

public java.lang.String[] dbSessions

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

supervisorSRSubject

public java.lang.String supervisorSRSubject

afecsHome

public java.lang.String afecsHome

isMulticast

public boolean isMulticast

UIMulticastUDL

public java.lang.String UIMulticastUDL

iam

public CodaRcGui iam

cl

public CommandLine cl

help

public boolean help

isComponentTBActive

public boolean isComponentTBActive

startEndFormatter

public java.text.SimpleDateFormat startEndFormatter

msgReportingRuTypes

public java.util.Map<java.lang.String,java.lang.Integer> msgReportingRuTypes

_runState

public java.lang.String _runState

_runType

public java.lang.String _runType

_session

public java.lang.String _session

_supervisorName

public java.lang.String _supervisorName

_runNumber

public int _runNumber

gDriver

public GuiDriver gDriver

dbDriver

public DbDriver dbDriver

cMsgConHB

public RcMsgHeartBeat cMsgConHB

gUpdateThread

public RcGraphUpdate gUpdateThread
Constructor Detail

CodaRcGui

public CodaRcGui(CommandLine c)
Constructor

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

getConfigurationTextField

public javax.swing.JTextField getConfigurationTextField()

getRunStateTextField

public javax.swing.JTextField getRunStateTextField()

getStatusLabel

public javax.swing.JLabel getStatusLabel()

getStartTimeTextField

public javax.swing.JTextField getStartTimeTextField()

getEndTimeTextField

public javax.swing.JTextField getEndTimeTextField()

getSessionTextField

public javax.swing.JTextField getSessionTextField()

getConfigureButton

public javax.swing.JButton getConfigureButton()

getConnectMenuItem

public javax.swing.JMenuItem getConnectMenuItem()

getDisconnectMenuItem

public javax.swing.JMenuItem getDisconnectMenuItem()

getReleaseComponentMenuItem

public javax.swing.JMenuItem getReleaseComponentMenuItem()

getSessionMenu

public javax.swing.JMenu getSessionMenu()

getCoolMenuItem

public javax.swing.JMenuItem getCoolMenuItem()

getConfigMenu

public javax.swing.JMenu getConfigMenu()

getDownloadButton

public javax.swing.JButton getDownloadButton()

getPrestartButton

public javax.swing.JButton getPrestartButton()

getGoButton

public javax.swing.JButton getGoButton()

getEndButton

public javax.swing.JButton getEndButton()

getStartButton

public javax.swing.JButton getStartButton()

getPauseButton

public javax.swing.JButton getPauseButton()

getResetButton

public javax.swing.JButton getResetButton()

getDateLabel

public javax.swing.JLabel getDateLabel()

getEventNumberTextField

public javax.swing.JTextField getEventNumberTextField()

getMonitorCompTextField

public javax.swing.JTextField getMonitorCompTextField()

getExpidTextField

public javax.swing.JTextField getExpidTextField()

getAction22

public org.jlab.coda.afecs.ui.rcgui.CodaRcGui.NewSessionAction getAction22()

getRunNumberTextField

public javax.swing.JTextField getRunNumberTextField()

getHelpMenu

public javax.swing.JMenu getHelpMenu()

getRunStatePanel

public javax.swing.JPanel getRunStatePanel()

getGraph1

public javax.swing.JTabbedPane getGraph1()

getOutputFileTextField

public javax.swing.JTextField getOutputFileTextField()

_createNewGraphs

public void _createNewGraphs()
recreates graphs


_tgCreateSelectedCompDM

public void _tgCreateSelectedCompDM()
Create and add data model for selected components. Selected components will be stored in graphingCompList map.


_tgClear

public void _tgClear()
Clears time graphs


_tgReset

public void _tgReset()

_bgRemove

public void _bgRemove()

_clearLocalDB

public void _clearLocalDB()

_clearTables

public void _clearTables()

_clearCompTree

public void _clearCompTree()

updateDaLogTable

public void updateDaLogTable(java.lang.String name,
                             java.lang.String txt,
                             java.lang.String severity,
                             int severityId)
local update of the daLog table

Parameters:
name - the name of the agent/client ( this case the name of the gui)
txt - of the daLog message
severity - of the message
severityId - of the message

doSubscriptions

public boolean doSubscriptions()
RcUI basic subscriptions

Returns:
status of the method execution.

un_Subscribe

public boolean un_Subscribe()

addRemoveSelected2Graph

public void addRemoveSelected2Graph(boolean add)
Adds/removes the selected component to the graphingCompList map for graphing in the charts

Parameters:
add - if true adds the graph to the chart, false removes it from the chart.

hardResetCharts

public void hardResetCharts()
Recreates graphs in the charts, by removing and adding graphs to the appropriate charts.


defineWatch

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

Parameters:
map - of the AComponents key = component name
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 selection

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