public class BooleanTrend extends javax.swing.JPanel implements IControlee, java.awt.event.ActionListener, IJLChartActionListener, IRefresherListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JMenuItem |
addY1MenuItem |
protected javax.swing.JMenuItem |
addY2MenuItem |
protected AttributePolledList |
attList |
protected javax.swing.JMenuItem |
attOptionMenuItem |
protected static IEntityFilter |
booleanFilter |
protected java.util.Map |
buttonMap |
protected static java.util.GregorianCalendar |
calendar |
protected javax.swing.JButton |
cfgButton |
protected javax.swing.JMenuItem |
cfgMenuI |
protected fr.esrf.tangoatk.widget.attribute.BooleanConfigPanel |
cfgPanel |
static java.lang.String |
config
Corresponds to the button "Add new attribute"
|
protected javax.swing.JLabel |
dateLabel |
protected static double[] |
defaultMinMax |
static int |
DEVICE_LABEL_ALWAYS
Device name are always displayed whithin chart label
|
static int |
DEVICE_LABEL_AUTO
Device name are displayed whithin chart label when needed
|
static int |
DEVICE_LABEL_NEVER
Device name are never displayed whithin chart label
|
protected static java.awt.Point |
frameDimension |
protected static java.awt.Point |
framePos |
protected static java.text.SimpleDateFormat |
genFormat |
protected java.lang.String |
graphTitle |
protected javax.swing.JPanel |
innerPanel |
protected int |
isShowingDeviceName |
protected static double[] |
labelPositions |
protected static java.lang.String[] |
labels |
protected fr.esrf.tangoatk.widget.attribute.BooleanTrendSelectionNode |
lastAdded |
protected java.lang.String |
lastConfig |
protected AttributePolledList |
lastCreatedList |
static java.lang.String |
load
Corresponds to the button "Load configuration"
|
protected javax.swing.JButton |
loadButton |
protected javax.swing.JMenuItem |
loadMenuI |
protected javax.swing.JTree |
mainTree |
protected javax.swing.tree.DefaultTreeModel |
mainTreeModel |
static java.lang.String |
option
Corresponds to the button "Global settings"
|
protected javax.swing.JButton |
optionButton |
protected javax.swing.JMenuItem |
optionMenuI |
protected javax.swing.JMenuItem |
optionMenuItem |
protected javax.swing.JFrame |
parent |
protected SimplePropertyFrame |
propFrame |
protected javax.swing.JMenuItem |
removeMenuItem |
static java.lang.String |
reset
Corresponds to the button "Reset trend"
|
protected javax.swing.JButton |
resetButton |
protected javax.swing.JMenuItem |
resetMenuI |
protected fr.esrf.tangoatk.widget.attribute.BooleanTrendSelectionNode |
rootNode |
static java.lang.String |
save
Corresponds to the button "Save configuration"
|
protected javax.swing.JButton |
saveButton |
protected javax.swing.JMenuItem |
saveMenuI |
static int |
SEL_NONE
Not selected
|
static int |
SEL_Y1
Selected on Y1
|
static int |
SEL_Y2
Selected on Y2
|
protected javax.swing.JMenuItem |
showtoolMenuI |
protected boolean |
singleDevice |
static java.lang.String |
start
Corresponds to the button "start monitoring"
|
protected javax.swing.JButton |
startButton |
protected javax.swing.JMenuItem |
startMenuI |
static java.lang.String |
stop
Corresponds to the button "stop monitoring"
|
protected javax.swing.JButton |
stopButton |
protected javax.swing.JMenuItem |
stopMenuI |
protected fr.esrf.tangoatk.widget.attribute.BooleanChart |
theGraph |
protected javax.swing.JToolBar |
theToolBar |
static java.lang.String |
time
Corresponds to the button "Set rfresh interval"
|
protected javax.swing.JButton |
timeButton |
protected javax.swing.JMenuItem |
timeMenuI |
protected int |
timePrecision |
protected javax.swing.JPopupMenu |
toolMenu |
protected javax.swing.JPopupMenu |
treeMenu |
protected javax.swing.JScrollPane |
treeView |
static java.lang.String |
zoom
Corresponds to the button "Zoom"
|
protected javax.swing.JButton |
zoomButton |
protected javax.swing.JMenuItem |
zoomMenuI |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
BooleanTrend()
Default constructor.
|
BooleanTrend(javax.swing.JFrame parent)
Trend constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
void |
actionPerformed(JLChartActionEvent evt)
Called when the user select a user action (available from
contextual chart menu)
|
void |
addAttribute(IBooleanScalar scalar) |
void |
addAttribute(java.lang.String name)
addAttribute will add the IBooleanScalar to the BooleanTrend. |
void |
addToAxis(IBooleanScalar attribute,
int axisSelection,
boolean addToModel)
Adds an attribute to an axis of this trend (or removes the attribute from
axis).
|
void |
addToAxis(java.lang.String attributeName,
int axisSelection,
boolean addToModel)
Adds an attribute to an axis of this trend (or removes the attribute from
axis).
|
void |
clearModel()
Free any allocated resource and stop refreshing.
|
void |
disableButton(java.lang.String buttonName)
Disables the button corresponding to the string
|
void |
enableButton(java.lang.String buttonName)
Enables the button corresponding to the string
|
boolean |
getActionState(JLChartActionEvent evt)
Called when the the action name starting with 'chk'
(displayed as check box menu item) and each time the chart menu
is shown.
|
int |
getAxisForAttribute(java.lang.String attributeName)
Returns the axis associated with an attribute
|
JLChart |
getChart()
Returns a handle to the chart
|
JLDataView |
getDataViewForAttribute(java.lang.String attributeName)
Returns the dataview associated with an attribute (null if no dataview is
associated with the attribute)
|
double |
getMaxDisplayDuration() |
AttributePolledList |
getModel() |
java.awt.Dimension |
getPreferredSize() |
double |
getSamplingRate()
Deprecated.
no longer used (has no FX)
|
java.lang.String |
getSettings()
returns the configuration as string.
|
int |
getTimePrecision() |
java.lang.String |
getTitle()
Returns the frame_title field read in the config file.
|
int |
getXAxisLength()
Deprecated.
no longer used (has no FX)
|
boolean |
isButtonBarVisible()
Returns true only if toolbar is visible
|
boolean |
isDateVisible()
Returns true only if datelabel is visible
|
boolean |
isLegendVisible()
Deprecated.
use getChart()
|
boolean |
isListVisible()
Deprecated.
no longer used (has no FX)
|
boolean |
isLogarithmicScale()
Deprecated.
use getChart()
|
boolean |
isSelectionTreeVisible()
Returns true only if the selection tree is visible
|
int |
isShowingDeviceNames()
Determines whether or not device names (within chart labels) are visible.
|
boolean |
isShowingNames()
Deprecated.
no longer used (has no FX)
|
java.lang.String |
loadSetting(java.lang.String filename)
Load graph settings.
|
static void |
main(java.lang.String[] args) |
void |
ok()
ok will be called when the component is visible and
the user presses the OK button on the ButtonBar
Expected behaviour is to set all the values on the model the
widget is representing followed by a
getRootPane().getParent().setVisible(false); |
void |
refreshStep()
Called by an entityList refresher afer models update.
|
void |
removeAttribute(IBooleanScalar scalar) |
void |
resetTrend() |
void |
saveSetting(java.lang.String filename)
Save settings.
|
void |
setButtonBarVisible(boolean b)
Displays or hides the toolbar
|
void |
setDateVisible(boolean b)
Displays or hides the date label
|
void |
setLegendVisible(boolean b)
Deprecated.
use getChart()
|
void |
setListVisible(boolean b)
Deprecated.
no longer used (has no FX)
|
void |
setLogarithmicScale(boolean logarithmic)
Deprecated.
use getChart()
|
void |
setMaxDisplayDuration(double maxDisplay) |
void |
setModel(AttributePolledList list)
This
setModel which takes an AttributePolledList as a
parameter, will just add the boolean scalar attributes in the list to the
list viewer in the BooleanTrend. |
void |
setSamplingRate(double rate)
Deprecated.
no longer used (has no FX)
|
void |
setSelectionTreeVisible(boolean b)
Displays or hides the selection tree
|
java.lang.String |
setSetting(java.lang.String txt)
Apply a configuration.
|
void |
setShowingDeviceNames(int mode)
Determines whether or not device names (within chart labels) are visible.
|
void |
setShowingNames(boolean b)
Deprecated.
no longer used (has no FX)
|
void |
setTimePrecision(int timePrecision) |
void |
setXAxisLength(int length)
Deprecated.
no longer used (has no FX)
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, 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
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
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, 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
public static final int SEL_NONE
public static final int SEL_Y1
public static final int SEL_Y2
public static final int DEVICE_LABEL_AUTO
public static final int DEVICE_LABEL_NEVER
public static final int DEVICE_LABEL_ALWAYS
protected javax.swing.JFrame parent
protected javax.swing.JToolBar theToolBar
protected javax.swing.JPopupMenu toolMenu
protected javax.swing.JButton optionButton
protected javax.swing.JMenuItem optionMenuI
protected javax.swing.JButton stopButton
protected javax.swing.JMenuItem stopMenuI
protected javax.swing.JButton startButton
protected javax.swing.JMenuItem startMenuI
protected javax.swing.JButton loadButton
protected javax.swing.JMenuItem loadMenuI
protected javax.swing.JButton saveButton
protected javax.swing.JMenuItem saveMenuI
protected javax.swing.JButton zoomButton
protected javax.swing.JMenuItem zoomMenuI
protected javax.swing.JButton timeButton
protected javax.swing.JMenuItem timeMenuI
protected javax.swing.JButton cfgButton
protected javax.swing.JMenuItem cfgMenuI
protected javax.swing.JButton resetButton
protected javax.swing.JMenuItem resetMenuI
protected javax.swing.JMenuItem showtoolMenuI
protected javax.swing.JPanel innerPanel
protected javax.swing.JLabel dateLabel
protected javax.swing.JScrollPane treeView
protected javax.swing.JTree mainTree
protected javax.swing.tree.DefaultTreeModel mainTreeModel
protected fr.esrf.tangoatk.widget.attribute.BooleanTrendSelectionNode rootNode
protected javax.swing.JPopupMenu treeMenu
protected javax.swing.JMenuItem addY1MenuItem
protected javax.swing.JMenuItem addY2MenuItem
protected javax.swing.JMenuItem removeMenuItem
protected javax.swing.JMenuItem optionMenuItem
protected javax.swing.JMenuItem attOptionMenuItem
protected fr.esrf.tangoatk.widget.attribute.BooleanChart theGraph
protected java.lang.String graphTitle
protected fr.esrf.tangoatk.widget.attribute.BooleanConfigPanel cfgPanel
protected static java.awt.Point framePos
protected static java.awt.Point frameDimension
protected AttributePolledList attList
protected fr.esrf.tangoatk.widget.attribute.BooleanTrendSelectionNode lastAdded
protected AttributePolledList lastCreatedList
protected SimplePropertyFrame propFrame
protected java.lang.String lastConfig
protected boolean singleDevice
protected int isShowingDeviceName
protected static final java.util.GregorianCalendar calendar
protected static final java.text.SimpleDateFormat genFormat
protected java.util.Map buttonMap
public static final java.lang.String start
public static final java.lang.String stop
public static final java.lang.String save
public static final java.lang.String load
public static final java.lang.String zoom
public static final java.lang.String time
public static final java.lang.String option
public static final java.lang.String config
public static final java.lang.String reset
protected int timePrecision
protected static final java.lang.String[] labels
protected static final double[] labelPositions
protected static final double[] defaultMinMax
protected static final IEntityFilter booleanFilter
public BooleanTrend(javax.swing.JFrame parent)
parent
- Parent framepublic BooleanTrend()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
public void actionPerformed(JLChartActionEvent evt)
IJLChartActionListener
actionPerformed
in interface IJLChartActionListener
evt
- Event object (containing acion name and state)JLChart.addUserAction(java.lang.String)
public boolean getActionState(JLChartActionEvent evt)
IJLChartActionListener
getActionState
in interface IJLChartActionListener
evt
- Event object (containing acion name)JLChart.addUserAction(java.lang.String)
public int getTimePrecision()
public void setTimePrecision(int timePrecision)
public void refreshStep()
IRefresherListener
refreshStep
in interface IRefresherListener
public void clearModel()
public void setModel(AttributePolledList list)
setModel
which takes an AttributePolledList as a
parameter, will just add the boolean scalar attributes in the list to the
list viewer in the BooleanTrend. It will not add any of the attributes to
the BooleanTrend. The list used by the BooleanTrend will be a copy of the
given list. If you don't use the list anymore (the on given in
parameter), remember to clean it, because this is not the list the
BooleanTrand uses (it uses a copy of it)list
- an AttributePolledList
valuepublic void addAttribute(java.lang.String name)
addAttribute
will add the IBooleanScalar to the BooleanTrend.
Additional calls to addAttribute will add more IBooleanScalars to the
BooleanTrend.name
- Attribute namepublic void addAttribute(IBooleanScalar scalar)
public void removeAttribute(IBooleanScalar scalar)
public AttributePolledList getModel()
public java.lang.String getSettings()
setSetting(java.lang.String)
public java.lang.String setSetting(java.lang.String txt)
txt
- Configuration text.getSettings()
public void saveSetting(java.lang.String filename)
filename
- file to be saved.public java.lang.String loadSetting(java.lang.String filename)
filename
- file to be readpublic java.lang.String getTitle()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void setLegendVisible(boolean b)
public boolean isLegendVisible()
public void setSamplingRate(double rate)
public double getSamplingRate()
public void setXAxisLength(int length)
public int getXAxisLength()
public void setLogarithmicScale(boolean logarithmic)
public boolean isLogarithmicScale()
public void setListVisible(boolean b)
public boolean isListVisible()
public void setShowingNames(boolean b)
public boolean isShowingNames()
public void setShowingDeviceNames(int mode)
mode
- Device name display modeDEVICE_LABEL_AUTO
,
DEVICE_LABEL_NEVER
,
DEVICE_LABEL_ALWAYS
,
isShowingDeviceNames()
public int isShowingDeviceNames()
setShowingDeviceNames(int)
public void setButtonBarVisible(boolean b)
b
- Visible flagpublic boolean isButtonBarVisible()
public void setDateVisible(boolean b)
b
- Visible flagpublic boolean isDateVisible()
public void setSelectionTreeVisible(boolean b)
b
- Visible flagpublic boolean isSelectionTreeVisible()
public JLChart getChart()
public void ok()
IControlee
ok
will be called when the component is visible and
the user presses the OK button on the ButtonBar
Expected behaviour is to set all the values on the model the
widget is representing followed by a
getRootPane().getParent().setVisible(false);
ok
in interface IControlee
ButtonBar
public void disableButton(java.lang.String buttonName)
public void enableButton(java.lang.String buttonName)
public void addToAxis(java.lang.String attributeName, int axisSelection, boolean addToModel)
attributeName
- The name of the attributeaxisSelection
- The axis. Can be SEL_X (x axis), SEL_Y1 (y1 axis), SEL_Y2 (y2
axis) or SEL_NONE (removes attribute from axis)addToModel
- A boolean to say wheather the attribute has to be added in
model or not. If true
and the attribute is not
in model, the attribute is added in the trend model.#SEL_X
,
SEL_Y1
,
SEL_Y2
,
SEL_NONE
public void addToAxis(IBooleanScalar attribute, int axisSelection, boolean addToModel)
attribute
- The attributeaxisSelection
- The axis. Can be SEL_X (x axis), SEL_Y1 (y1 axis), SEL_Y2 (y2
axis) or SEL_NONE (removes attribute from axis)addToModel
- A boolean to say wheather the attribute has to be added in
model or not. If true
and the attribute is not
in model, the attribute is added in the trend model.#SEL_X
,
SEL_Y1
,
SEL_Y2
,
SEL_NONE
public int getAxisForAttribute(java.lang.String attributeName)
public JLDataView getDataViewForAttribute(java.lang.String attributeName)
attributeName
- The name of the attributepublic void setMaxDisplayDuration(double maxDisplay)
public double getMaxDisplayDuration()
public void resetTrend()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception