public class AttributeMultiChart extends JLChart implements INumberScalarListener
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected JLDataView |
alarm |
protected boolean |
alarmEnable |
protected double |
alarmLevel |
protected javax.swing.JMenuItem |
aliasItem |
protected int |
axisDisplayMode |
protected javax.swing.JMenuItem |
axisInfoAliasItem |
protected javax.swing.JMenuItem |
axisInfoDeviceNameItem |
protected javax.swing.JMenuItem |
axisInfoFullNameItem |
protected javax.swing.JMenuItem |
axisInfoIndexItem |
protected javax.swing.JMenuItem |
axisInfoLabelItem |
protected javax.swing.JMenu |
axisInfoMenu |
protected javax.swing.JMenuItem |
axisInfoNoDeviceNameItem |
static int |
barChart
int value representing the kind of chart "BarChart"
|
protected javax.swing.JMenuItem |
barChartItem |
protected javax.swing.JMenuItem |
boxItem |
protected javax.swing.JMenuItem |
boxItem2 |
protected java.awt.Color |
chartColor |
protected boolean |
chartOnXAxis |
protected int |
chartStyle |
protected javax.swing.JMenuItem |
circleItem |
protected javax.swing.JMenuItem |
circleItem2 |
protected javax.swing.JMenuItem |
crossItem |
protected javax.swing.JMenuItem |
crossItem2 |
protected java.util.Map<INumberScalar,java.util.List<java.lang.Object>> |
dataViewHash |
protected javax.swing.JMenuItem |
deviceNameItem |
protected javax.swing.JMenuItem |
diamondItem |
protected javax.swing.JMenuItem |
diamondItem2 |
static int |
DISPLAY_ALIAS
int value representing the fact that you want to see the attribute's
alias in tooltip/X Axis
|
static int |
DISPLAY_DEVICE_NAME
int value representing the fact that you want to see the name of the
device to which the attribute belongs in tooltip/X Axis
|
static int |
DISPLAY_FULL_NAME
int value representing the fact that you want to see the attribute's
complete name in tooltip (default option)/X Axis
|
static int |
DISPLAY_INDEX
int value representing the fact that you want to see the index of the
attribute in X Axis (default option)
|
static int |
DISPLAY_LABEL
int value representing the fact that you want to see the attribute's
label in tooltip/X Axis
|
static int |
DISPLAY_NAME_NO_DEVICE
int value representing the fact that you want to see the attribute's name
without its device name in tooltip/X Axis
|
protected int |
displayMode |
static int |
dotChart
int value representing the kind of chart "DotChart"
|
protected javax.swing.JMenu |
dotChartMenu |
protected javax.swing.JMenuItem |
dotItem |
protected javax.swing.JMenuItem |
dotItem2 |
protected JLDataView |
fault |
protected double |
faultLevel |
protected javax.swing.JMenuItem |
fullNameItem |
protected java.lang.String |
header |
protected boolean |
highAlarm |
protected boolean |
highFault |
protected javax.swing.JMenuItem |
horizLineItem |
protected javax.swing.JMenuItem |
horizLineItem2 |
protected javax.swing.JMenuItem |
labelItem |
protected java.lang.String |
lastConfig |
protected javax.swing.JMenuItem |
linear |
static int |
lineChart
int value representing the kind of chart "LineChart"
|
protected javax.swing.JMenu |
lineChartMenu |
protected JLDataView |
lineView |
protected javax.swing.JMenuItem |
logarithmic |
protected int |
markerStyle |
protected AttributeList |
model |
protected javax.swing.JMenu |
multiChartMenu |
protected javax.swing.JMenuItem |
noDeviceNameItem |
protected int |
refreshingPeriod |
protected javax.swing.JMenuItem |
squareItem |
protected javax.swing.JMenuItem |
squareItem2 |
protected javax.swing.JMenuItem |
starItem |
protected javax.swing.JMenuItem |
starItem2 |
protected javax.swing.JMenu |
tooltipMenu |
protected javax.swing.JMenuItem |
triangleItem |
protected javax.swing.JMenuItem |
triangleItem2 |
protected java.lang.String |
unit |
protected javax.swing.JMenuItem |
vertLineItem |
protected javax.swing.JMenuItem |
vertLineItem2 |
protected java.lang.String |
xaxisName |
protected javax.swing.JMenu |
YScale |
chartMenu, dialogParent, FR_DATE_FORMAT, LABEL_DOWN, LABEL_LEFT, LABEL_RIGHT, LABEL_ROW, LABEL_UP, labelRect, lastDataFileLocation, lastFileFilter, lastSnapshotLocation, maxDisplayDuration, MENU_CHARTPROP, MENU_DATALOAD, MENU_DATASAVE, MENU_DVPROP, MENU_PRINT, MENU_STAT, MENU_TABLE, modalDialog, noValueString, parentFrame, preferDialog, tableDialog, US_DATE_FORMAT
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
AttributeMultiChart()
Default Constructor
|
AttributeMultiChart(int chartStyle)
Constructor
|
AttributeMultiChart(int chartStyle,
int displayMode)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
protected java.lang.String |
applySettings(CfFileReader cffilereader) |
java.lang.String[] |
buildPanelString(SearchInfo si) |
void |
clearModel()
Clears the chart
|
void |
errorChange(ErrorEvent arg0) |
double |
getAlarmLevel() |
int |
getAxisDisplayMode()
Returns an int representing what kind of information about your attribute
you can see in X axis.
|
java.awt.Color |
getChartColor() |
java.lang.String |
getChartHeader() |
int |
getChartStyle() |
int |
getDisplayMode()
Returns an int representing what kind of information about your attribute
you can see in tooltip.
|
double |
getFaultLevel() |
int |
getMarkerStyle()
Returns the marker style style for line chart and dot chart
|
int |
getRefreshingPeriod() |
java.lang.String |
getSettings() |
java.lang.String |
getUnit() |
java.lang.String |
getXaxisName() |
protected void |
initComponents() |
protected void |
initLevels() |
boolean |
isAlarmEnable() |
boolean |
isChartOnXAxis() |
boolean |
isHighAlarm() |
boolean |
isHighFault() |
protected void |
loadPerformed() |
java.lang.String |
loadSetting(java.lang.String s)
Loads configuration from a file
|
static void |
main(java.lang.String[] args)
Main class, so you can have an example.
|
protected void |
manageLabels() |
void |
numberScalarChange(NumberScalarEvent numberScalarEvent) |
protected void |
prepareName(JLDataView view,
INumberScalar scalar) |
protected void |
savePerformed() |
void |
saveSetting(java.lang.String s)
Saves the configuration of the chart in a file
|
void |
setAlarmEnable(boolean alarmEnable) |
void |
setAlarmLevel(double alarm_level) |
protected void |
setAttributeListAsString(java.lang.String attributeListAsString) |
void |
setAxisDisplayMode(int axisDisplayMode)
Set what kind of information about your attribute you can see in X axis.
|
void |
setChartColor(java.awt.Color chartColor) |
void |
setChartHeader(java.lang.String header) |
void |
setChartOnXAxis(boolean chartOnXAxis) |
void |
setChartStyle(int style)
Allows you to choose which kind of chart you want to use
|
void |
setDisplayMode(int displayMode)
Set what kind of information about your attribute you can see in tooltip.
|
void |
setFaultLevel(double fault_level) |
void |
setHighAlarm(boolean highAlarm) |
void |
setHighFault(boolean highFault) |
void |
setMarkerStyle(int style)
Sets the marker style for line chart and dot chart
|
void |
setModel(AttributeList attl)
Sets the attributes this chart will display.
|
void |
setRefreshingPeriod(int refreshingPeriod)
sets the refreshing period of the associated
AttributeList |
void |
setUnit(java.lang.String unit) |
void |
setWidth(int bar_width)
Sets the width of the bars of the bar chart
|
void |
setXaxisName(java.lang.String xaxis_name) |
protected void |
showTableAll() |
void |
stateChange(AttributeStateEvent arg0) |
protected void |
updateToolTips() |
addData, addJLChartActionListener, addMenuItem, addSeparator, addUserAction, applyConfiguration, enterZoom, exitZoom, garbageData, getChartBackground, getConfiguration, getDisplayDuration, getHeader, getHeaderFont, getHelpString, getLabelFont, getLabelPlacement, getMargin, getMaxDisplayDuration, getNoValueString, getTimePrecision, getUserActionMenuItem, getXAxis, getY1Axis, getY2Axis, isInRange, isLabelVisible, isPaintAxisFirst, isXAxisOnBottom, isZoomed, loadDataFile, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paint, printGraph, refreshTableSingle, removeDataView, removeJLChartActionListener, removeMenuItem, removeUserAction, reset, reset, setBackground, setChartBackground, setDisplayDuration, setFrameParent, setHeader, setHeaderColor, setHeaderFont, setHeaderVisible, setJLChartListener, setLabelFont, setLabelPlacement, setLabelVisible, setMargin, setMaxDisplayDuration, setNoValueString, setPaintAxisFirst, setParentForTableDialog, setParentForTableDialog, setPreferDialogForTable, setTimePrecision, setXAxisOnBottom, showDataOptionDialog, showOptionDialog, showPanel, showPanel, showStatAll, showStatAll, showTableAll, unselectAll
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, 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, updateUI
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
protected java.lang.String header
protected java.lang.String xaxisName
protected java.lang.String unit
protected double alarmLevel
protected double faultLevel
protected JLDataView alarm
protected JLDataView fault
protected JLDataView lineView
protected java.lang.String lastConfig
protected int refreshingPeriod
protected java.util.Map<INumberScalar,java.util.List<java.lang.Object>> dataViewHash
protected AttributeList model
protected int chartStyle
protected int markerStyle
protected java.awt.Color chartColor
protected boolean alarmEnable
protected boolean chartOnXAxis
protected boolean highAlarm
protected boolean highFault
protected javax.swing.JMenu multiChartMenu
protected javax.swing.JMenuItem barChartItem
protected javax.swing.JMenu dotChartMenu
protected javax.swing.JMenuItem dotItem
protected javax.swing.JMenuItem boxItem
protected javax.swing.JMenuItem triangleItem
protected javax.swing.JMenuItem diamondItem
protected javax.swing.JMenuItem starItem
protected javax.swing.JMenuItem vertLineItem
protected javax.swing.JMenuItem horizLineItem
protected javax.swing.JMenuItem crossItem
protected javax.swing.JMenuItem circleItem
protected javax.swing.JMenuItem squareItem
protected javax.swing.JMenu lineChartMenu
protected javax.swing.JMenuItem dotItem2
protected javax.swing.JMenuItem boxItem2
protected javax.swing.JMenuItem triangleItem2
protected javax.swing.JMenuItem diamondItem2
protected javax.swing.JMenuItem starItem2
protected javax.swing.JMenuItem vertLineItem2
protected javax.swing.JMenuItem horizLineItem2
protected javax.swing.JMenuItem crossItem2
protected javax.swing.JMenuItem circleItem2
protected javax.swing.JMenuItem squareItem2
protected javax.swing.JMenu tooltipMenu
protected javax.swing.JMenuItem fullNameItem
protected javax.swing.JMenuItem noDeviceNameItem
protected javax.swing.JMenuItem labelItem
protected javax.swing.JMenuItem aliasItem
protected javax.swing.JMenuItem deviceNameItem
protected javax.swing.JMenu axisInfoMenu
protected javax.swing.JMenuItem axisInfoFullNameItem
protected javax.swing.JMenuItem axisInfoNoDeviceNameItem
protected javax.swing.JMenuItem axisInfoLabelItem
protected javax.swing.JMenuItem axisInfoAliasItem
protected javax.swing.JMenuItem axisInfoDeviceNameItem
protected javax.swing.JMenuItem axisInfoIndexItem
protected javax.swing.JMenu YScale
protected javax.swing.JMenuItem logarithmic
protected javax.swing.JMenuItem linear
protected int displayMode
protected int axisDisplayMode
public static final int barChart
public static final int dotChart
public static final int lineChart
public static final int DISPLAY_FULL_NAME
public static final int DISPLAY_NAME_NO_DEVICE
public static final int DISPLAY_LABEL
public static final int DISPLAY_ALIAS
public static final int DISPLAY_DEVICE_NAME
public static final int DISPLAY_INDEX
public AttributeMultiChart()
public AttributeMultiChart(int chartStyle)
public AttributeMultiChart(int chartStyle, int displayMode)
chartStyle
- the kind of chart chosendisplayMode
- the kind of information you want to display in tooltipbarChart
,
dotChart
,
lineChart
,
DISPLAY_FULL_NAME
,
DISPLAY_NAME_NO_DEVICE
,
DISPLAY_LABEL
,
DISPLAY_ALIAS
,
DISPLAY_DEVICE_NAME
public int getMarkerStyle()
public void setMarkerStyle(int style)
MARKER_DOT
,
MARKER_BOX
,
MARKER_TRIANGLE
,
MARKER_DIAMOND
,
MARKER_STAR
,
MARKER_VERT_LINE
,
MARKER_HORIZ_LINE
,
MARKER_CROSS
,
MARKER_CIRCLE
,
MARKER_SQUARE
protected void initComponents()
public java.lang.String[] buildPanelString(SearchInfo si)
buildPanelString
in class JLChart
protected void initLevels()
public boolean isChartOnXAxis()
public void setChartOnXAxis(boolean chartOnXAxis)
public void setModel(AttributeList attl)
attl
- the list of Attribute as an AttributeList
public void clearModel()
public void setWidth(int bar_width)
bar_width
- the widthpublic boolean isHighAlarm()
public void setHighAlarm(boolean highAlarm)
public boolean isHighFault()
public void setHighFault(boolean highFault)
public void numberScalarChange(NumberScalarEvent numberScalarEvent)
numberScalarChange
in interface INumberScalarListener
public int getChartStyle()
barChart
,
dotChart
,
lineChart
public void setChartStyle(int style)
style
- the kind of chart you want to usebarChart
,
dotChart
,
lineChart
public void stateChange(AttributeStateEvent arg0)
stateChange
in interface IAttributeStateListener
public void errorChange(ErrorEvent arg0)
errorChange
in interface IErrorListener
public double getAlarmLevel()
public void setAlarmLevel(double alarm_level)
alarm_level
- The alarm_level to set. Set Double.MAX_VALUE to remove it.public double getFaultLevel()
public void setFaultLevel(double fault_level)
fault_level
- The fault_level to set. Set Double.MAX_VALUE to remove it.public java.lang.String getChartHeader()
public void setChartHeader(java.lang.String header)
header
- The header to set.public java.lang.String getUnit()
public void setUnit(java.lang.String unit)
unit
- The unit to set.public java.lang.String getXaxisName()
public void setXaxisName(java.lang.String xaxis_name)
xaxis_name
- The xaxis_name to set.public java.lang.String getSettings()
public void saveSetting(java.lang.String s)
s
- the file pathpublic java.lang.String loadSetting(java.lang.String s)
s
- the file pathpublic int getRefreshingPeriod()
AttributeList
public void setRefreshingPeriod(int refreshingPeriod)
AttributeList
refreshingPeriod
- the refreshing periodprotected java.lang.String applySettings(CfFileReader cffilereader)
protected void setAttributeListAsString(java.lang.String attributeListAsString)
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class JLChart
fr.esrf.tangoatk.widge.util.chart.JLChart#actionPerformed(ActionEvent)
protected void showTableAll()
showTableAll
in class JLChart
protected void loadPerformed()
protected void savePerformed()
public int getDisplayMode()
DISPLAY_FULL_NAME
,
DISPLAY_NAME_NO_DEVICE
,
DISPLAY_LABEL
,
DISPLAY_ALIAS
,
DISPLAY_DEVICE_NAME
public void setDisplayMode(int displayMode)
displayMode
- an int representing the kind of information about your
attribute you can see in tooltip.DISPLAY_FULL_NAME
,
DISPLAY_NAME_NO_DEVICE
,
DISPLAY_LABEL
,
DISPLAY_ALIAS
,
DISPLAY_DEVICE_NAME
public int getAxisDisplayMode()
DISPLAY_FULL_NAME
,
DISPLAY_NAME_NO_DEVICE
,
DISPLAY_LABEL
,
DISPLAY_ALIAS
,
DISPLAY_DEVICE_NAME
,
DISPLAY_INDEX
public void setAxisDisplayMode(int axisDisplayMode)
axisDisplayMode
- an int representing the kind of information about your
attribute you can see in X axis.DISPLAY_FULL_NAME
,
DISPLAY_NAME_NO_DEVICE
,
DISPLAY_LABEL
,
DISPLAY_ALIAS
,
DISPLAY_DEVICE_NAME
,
DISPLAY_INDEX
protected void updateToolTips()
protected void prepareName(JLDataView view, INumberScalar scalar)
protected void manageLabels()
public java.awt.Color getChartColor()
public void setChartColor(java.awt.Color chartColor)
chartColor
- The chartColor to set.public boolean isAlarmEnable()
public void setAlarmEnable(boolean alarmEnable)
alarmEnable
- The alarmEnable to set.public static void main(java.lang.String[] args)