fr.esrf.tangoatk.widget.util.chart
Class JLChart

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by fr.esrf.tangoatk.widget.util.chart.JLChart
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
AdvancedJLChart, AttributeMultiChart, DualNumberScalarChart, DualSpectrumImageViewer, MultiNumberSpectrumViewer, NonAttrNumberSpectrumViewer, NumberSpectrumItemTrend

public class JLChart
extends javax.swing.JComponent
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener

A Class to handle 2D graphics plot.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JPopupMenu chartMenu
           
protected  java.awt.Window dialogParent
           
static java.lang.String FR_DATE_FORMAT
           
static int LABEL_DOWN
          Place label at the bottom of the chart
static int LABEL_LEFT
          Place label at the left of the chart
static int LABEL_RIGHT
          Place label at the right of the chart
static int LABEL_ROW
          Place label at the bottom of the chart and try to arrange them in rows
static int LABEL_UP
          Place label at the top of the chart
protected  java.util.Vector<fr.esrf.tangoatk.widget.util.chart.LabelRect> labelRect
           
protected  java.lang.String lastDataFileLocation
           
protected  javax.swing.filechooser.FileFilter lastFileFilter
           
protected  java.lang.String lastSnapshotLocation
           
protected  double maxDisplayDuration
           
static int MENU_CHARTPROP
           
static int MENU_DATASAVE
           
static int MENU_DVPROP
           
static int MENU_PRINT
           
static int MENU_STAT
           
static int MENU_TABLE
           
protected  boolean modalDialog
           
protected  java.lang.String noValueString
           
protected  boolean preferDialog
           
protected  javax.swing.JDialog tableDialog
           
static java.lang.String US_DATE_FORMAT
           
 
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
JLChart()
          Graph constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
 void addData(JLDataView v, double x, double y)
          Add data to dataview , perform fast update when possible and garbage old data (if a display duration is specified).
 void addJLChartActionListener(IJLChartActionListener l)
          Add the specified JLChartAction listener to the list
 void addMenuItem(javax.swing.JMenuItem menu)
          Method to add item to the contextual menu.
 void addSeparator()
          Method to add a separator to the contextual menu.
 void addUserAction(java.lang.String name)
          Adds a user action.
 void applyConfiguration(CfFileReader f)
          Apply graph configuration.
protected  java.lang.String[] buildPanelString(SearchInfo si)
           
 void enterZoom()
          Enter zoom mode.
 void exitZoom()
          Exit zoom mode.
 int garbageData(JLDataView v)
          Remove points that exceed displayDuration.
 java.awt.Color getChartBackground()
          Gets the chart background (curve area)
 java.lang.String getConfiguration()
          Build a configuration string that can be write into a file and is compatible with CfFileReader.
 double getDisplayDuration()
          Gets the display duration.
protected  java.lang.String getExtension(java.io.File f)
          getExtension returns the extension of a given file, that is the part after the last `.' in the filename.
 java.lang.String getHeader()
          Gets the current header
 java.awt.Font getHeaderFont()
          Gets the header font
 java.lang.String getHelpString()
          Returns a string containing the configuration file help.
 java.awt.Font getLabelFont()
          Returns the label font
 int getLabelPlacement()
          Returns the current label placement.
 java.awt.Dimension getMargin()
          Gets the current margin
 double getMaxDisplayDuration()
          Gets the maximum allowed for a display duration
 java.lang.String getNoValueString()
          Used with saveDataFile().
 int getTimePrecision()
          Returns the allowed margin to make a projection on a line on data show (default: 0).
 JLAxis getXAxis()
          Return a handle to the x axis
 JLAxis getY1Axis()
          Return a handle to the left y axis
 JLAxis getY2Axis()
          Return a handle to the right y axis
 boolean isLabelVisible()
          Determines wether labels are visivle or not.
 boolean isPaintAxisFirst()
          Return painting order between axis and curve
 boolean isXAxisOnBottom()
          tells weather x Axis is on bottom of screen or not
 boolean isZoomed()
          Determines wether the graph is zoomed.
 void loadDataFile(java.lang.String fileName)
          Loads a data file and add the corresponding data to Y1 axis
static void main(java.lang.String[] args)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
          Paint the components.
 void printGraph()
          Prints out this graph.
 void refreshTableSingle(JLDataView v)
           
 void removeDataView(JLDataView view)
           
 void removeJLChartActionListener(IJLChartActionListener l)
          Remove the specified JLChartAction Listener
 void removeMenuItem(int menu)
          Method to remove item of the contextual menu.
 void removeUserAction(java.lang.String name)
          Removes a user action from chart menu.
 void reset()
           
protected  void reset(boolean showConfirmDialog)
           
 void setBackground(java.awt.Color c)
           
 void setChartBackground(java.awt.Color c)
          Sets the chart background (curve area)
 void setDisplayDuration(double v)
          Sets the display duration.This will garbage old data in all displayed data views.
 void setHeader(java.lang.String s)
          Sets the header and displays it.
 void setHeaderColor(java.awt.Color c)
          Sets the header color
 void setHeaderFont(java.awt.Font f)
          Sets header font
 void setHeaderVisible(boolean b)
          Displays or hides header.
 void setJLChartListener(IJLChartListener l)
          Set the specified JLChart Listener
 void setLabelFont(java.awt.Font f)
          Sets the label font
 void setLabelPlacement(int p)
          Set the label placement.
 void setLabelVisible(boolean b)
          Displays or hide labels.
 void setMargin(java.awt.Dimension d)
          Sets component margin
 void setMaxDisplayDuration(double maxDisplayDuration)
          Sets the maximum allowed for a display duration
 void setNoValueString(java.lang.String noValueString)
          Used with saveDataFile().
 void setPaintAxisFirst(boolean b)
          Paints axis under curve when true
 void setParentForTableDialog(java.awt.Dialog parent)
          Sets the parent that the "show table" dialog should have (in case you chose to have a dialog)
 void setParentForTableDialog(java.awt.Frame parent)
          Sets the parent that the "show table" dialog should have (in case you chose to have a dialog)
 void setPreferDialogForTable(boolean preferDialog, boolean modal)
          Sets if you prefer to use a JDialog with showTableXXX() methods instead of the classic JFrame
 void setTimePrecision(int milliseconds)
          Sets the allowed margin to make a projection on a line on data show.
 void setXAxisOnBottom(boolean b)
          Sets weather x Axis is on bottom of screen or not
 void showDataOptionDialog(JLDataView v)
          Display the data view option dialog.
 void showOptionDialog()
          Display the global graph option dialog.
 void showPanel(java.awt.Graphics g, SearchInfo si)
          Display the value tooltip.
protected  void showTableAll()
           
 void unselectAll()
          Remove all dataview from the graph.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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
 
Methods inherited from class java.awt.Container
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, 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, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LABEL_DOWN

public static final int LABEL_DOWN
Place label at the bottom of the chart

See Also:
Constant Field Values

LABEL_UP

public static final int LABEL_UP
Place label at the top of the chart

See Also:
Constant Field Values

LABEL_RIGHT

public static final int LABEL_RIGHT
Place label at the right of the chart

See Also:
Constant Field Values

LABEL_LEFT

public static final int LABEL_LEFT
Place label at the left of the chart

See Also:
Constant Field Values

LABEL_ROW

public static final int LABEL_ROW
Place label at the bottom of the chart and try to arrange them in rows

See Also:
Constant Field Values

MENU_CHARTPROP

public static final int MENU_CHARTPROP
See Also:
Constant Field Values

MENU_DVPROP

public static final int MENU_DVPROP
See Also:
Constant Field Values

MENU_TABLE

public static final int MENU_TABLE
See Also:
Constant Field Values

MENU_DATASAVE

public static final int MENU_DATASAVE
See Also:
Constant Field Values

MENU_PRINT

public static final int MENU_PRINT
See Also:
Constant Field Values

MENU_STAT

public static final int MENU_STAT
See Also:
Constant Field Values

US_DATE_FORMAT

public static final java.lang.String US_DATE_FORMAT
See Also:
Constant Field Values

FR_DATE_FORMAT

public static final java.lang.String FR_DATE_FORMAT
See Also:
Constant Field Values

labelRect

protected java.util.Vector<fr.esrf.tangoatk.widget.util.chart.LabelRect> labelRect

maxDisplayDuration

protected double maxDisplayDuration

chartMenu

protected javax.swing.JPopupMenu chartMenu

preferDialog

protected boolean preferDialog

modalDialog

protected boolean modalDialog

tableDialog

protected javax.swing.JDialog tableDialog

dialogParent

protected java.awt.Window dialogParent

lastSnapshotLocation

protected java.lang.String lastSnapshotLocation

lastDataFileLocation

protected java.lang.String lastDataFileLocation

lastFileFilter

protected javax.swing.filechooser.FileFilter lastFileFilter

noValueString

protected java.lang.String noValueString
Constructor Detail

JLChart

public JLChart()
Graph constructor.

Method Detail

getXAxis

public JLAxis getXAxis()
Return a handle to the x axis

Returns:
Axis handle

getY1Axis

public JLAxis getY1Axis()
Return a handle to the left y axis

Returns:
Axis handle

getY2Axis

public JLAxis getY2Axis()
Return a handle to the right y axis

Returns:
Axis handle

setXAxisOnBottom

public void setXAxisOnBottom(boolean b)
Sets weather x Axis is on bottom of screen or not

Parameters:
b - boolean to know weather x Axis is on bottom of screen or not

isXAxisOnBottom

public boolean isXAxisOnBottom()
tells weather x Axis is on bottom of screen or not

Returns:
[code]true[/code] if x Axis is on bottom of screen, [code]false[/code] otherwise

setHeaderFont

public void setHeaderFont(java.awt.Font f)
Sets header font

Parameters:
f - Header font
See Also:
getHeaderFont()

getHeaderFont

public java.awt.Font getHeaderFont()
Gets the header font

Returns:
Header font
See Also:
setHeaderFont(java.awt.Font)

setMargin

public void setMargin(java.awt.Dimension d)
Sets component margin

Parameters:
d - Margin
See Also:
getMargin()

getMargin

public java.awt.Dimension getMargin()
Gets the current margin

Returns:
Margin
See Also:
setMargin(java.awt.Dimension)

setBackground

public void setBackground(java.awt.Color c)
Overrides:
setBackground in class javax.swing.JComponent

setChartBackground

public void setChartBackground(java.awt.Color c)
Sets the chart background (curve area)

Parameters:
c - Background color

getChartBackground

public java.awt.Color getChartBackground()
Gets the chart background (curve area)

Returns:
Background color

setPaintAxisFirst

public void setPaintAxisFirst(boolean b)
Paints axis under curve when true

Parameters:
b - Painting order

isPaintAxisFirst

public boolean isPaintAxisFirst()
Return painting order between axis and curve

Returns:
true if axis are painted under curve

setHeaderVisible

public void setHeaderVisible(boolean b)
Displays or hides header.

Parameters:
b - true if the header is visible, false otherwise
See Also:
setHeader(java.lang.String)

setHeader

public void setHeader(java.lang.String s)
Sets the header and displays it.

Parameters:
s - Graph header
See Also:
getHeader()

getHeader

public java.lang.String getHeader()
Gets the current header

Returns:
Graph header
See Also:
setHeader(java.lang.String)

setDisplayDuration

public void setDisplayDuration(double v)
Sets the display duration.This will garbage old data in all displayed data views. Garbaging occurs when addData is called.

Parameters:
v - Displauy duration (millisec). Pass Double.POSITIVE_INFINITY to disable.
See Also:
addData(fr.esrf.tangoatk.widget.util.chart.JLDataView, double, double)

getDisplayDuration

public double getDisplayDuration()
Gets the display duration.

Returns:
Display duration
See Also:
setDisplayDuration(double)

getMaxDisplayDuration

public double getMaxDisplayDuration()
Gets the maximum allowed for a display duration

Returns:
Maximum allowed for a display duration
See Also:
setMaxDisplayDuration(double), setDisplayDuration(double)

setMaxDisplayDuration

public void setMaxDisplayDuration(double maxDisplayDuration)
Sets the maximum allowed for a display duration

Parameters:
maxDisplayDuration - The maximum allowed for a display duration
See Also:
getMaxDisplayDuration(), getDisplayDuration(), setDisplayDuration(double)

setHeaderColor

public void setHeaderColor(java.awt.Color c)
Sets the header color

Parameters:
c - Header color

setLabelVisible

public void setLabelVisible(boolean b)
Displays or hide labels.

Parameters:
b - true if labels are visible, false otherwise
See Also:
isLabelVisible()

isLabelVisible

public boolean isLabelVisible()
Determines wether labels are visivle or not.

Returns:
true if labels are visible, false otherwise

setLabelPlacement

public void setLabelPlacement(int p)
Set the label placement.

Parameters:
p - Placement
See Also:
LABEL_UP, LABEL_DOWN, LABEL_ROW, LABEL_LEFT, LABEL_RIGHT

getLabelPlacement

public int getLabelPlacement()
Returns the current label placement.

Returns:
Label placement
See Also:
setLabelPlacement(int)

setLabelFont

public void setLabelFont(java.awt.Font f)
Sets the label font

Parameters:
f -

getLabelFont

public java.awt.Font getLabelFont()
Returns the label font

See Also:
setLabelFont(java.awt.Font)

showOptionDialog

public void showOptionDialog()
Display the global graph option dialog.


showDataOptionDialog

public void showDataOptionDialog(JLDataView v)
Display the data view option dialog.


isZoomed

public boolean isZoomed()
Determines wether the graph is zoomed.

Returns:
true if the , false otherwise

enterZoom

public void enterZoom()
Enter zoom mode. This happens when you hold the left mouse button down and drag the mouse.


setJLChartListener

public void setJLChartListener(IJLChartListener l)
Set the specified JLChart Listener

Parameters:
l - JLChart listener. If set to null the listener will be removed.

addUserAction

public void addUserAction(java.lang.String name)
Adds a user action. It will be available from the contextual chart menu. All JLChartActionListener are triggered when a user action is executed. Hint: If the action name starts with 'chk' , it will be displayed as check box menu item. Each time the chart menu is shown, a getActionState() is executed on all listener, if several listener handle the same action, the result will be a logical and of all results.

Parameters:
name - Action name

removeUserAction

public void removeUserAction(java.lang.String name)
Removes a user action from chart menu.

Parameters:
name - Action name

addJLChartActionListener

public void addJLChartActionListener(IJLChartActionListener l)
Add the specified JLChartAction listener to the list

Parameters:
l - Listener to add

exitZoom

public void exitZoom()
Exit zoom mode.


removeMenuItem

public void removeMenuItem(int menu)
Method to remove item of the contextual menu.

Parameters:
menu - Item to remove
See Also:
MENU_CHARTPROP, MENU_DVPROP, MENU_TABLE, MENU_DATASAVE, MENU_PRINT, MENU_STAT

addMenuItem

public void addMenuItem(javax.swing.JMenuItem menu)
Method to add item to the contextual menu.

Parameters:
menu - MenuItem to add

addSeparator

public void addSeparator()
Method to add a separator to the contextual menu.


removeJLChartActionListener

public void removeJLChartActionListener(IJLChartActionListener l)
Remove the specified JLChartAction Listener

Parameters:
l - Listener to remove

applyConfiguration

public void applyConfiguration(CfFileReader f)
Apply graph configuration. This includes all global settings. The CfFileReader object must have been filled by the caller.

Parameters:
f - Handle to CfFileReader object that contains global graph param
See Also:
CfFileReader.parseText(java.lang.String), CfFileReader.readFile(java.lang.String), JLAxis.applyConfiguration(java.lang.String, fr.esrf.tangoatk.widget.util.chart.CfFileReader), JLDataView.applyConfiguration(java.lang.String, fr.esrf.tangoatk.widget.util.chart.CfFileReader)

getConfiguration

public java.lang.String getConfiguration()
Build a configuration string that can be write into a file and is compatible with CfFileReader.

Returns:
A string containing param.
See Also:
applyConfiguration(fr.esrf.tangoatk.widget.util.chart.CfFileReader), JLDataView.getConfiguration(java.lang.String), JLAxis.getConfiguration(java.lang.String)

getHelpString

public java.lang.String getHelpString()
Returns a string containing the configuration file help.


unselectAll

public void unselectAll()
Remove all dataview from the graph.


printGraph

public void printGraph()
Prints out this graph.


loadDataFile

public void loadDataFile(java.lang.String fileName)
Loads a data file and add the corresponding data to Y1 axis

Parameters:
fileName - the full path of the data file

refreshTableSingle

public void refreshTableSingle(JLDataView v)

showTableAll

protected void showTableAll()

getExtension

protected java.lang.String getExtension(java.io.File f)
getExtension returns the extension of a given file, that is the part after the last `.' in the filename.

Parameters:
f - a File value
Returns:
a String value

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

paint

public void paint(java.awt.Graphics g)
Paint the components. Use the repaint method to repaint the graph.

Overrides:
paint in class javax.swing.JComponent
Parameters:
g - Graphics object.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

buildPanelString

protected java.lang.String[] buildPanelString(SearchInfo si)

showPanel

public void showPanel(java.awt.Graphics g,
                      SearchInfo si)
Display the value tooltip.

Parameters:
g - Graphics object
si - SearchInfo structure.
See Also:
JLAxis.searchNearest(int, int, fr.esrf.tangoatk.widget.util.chart.JLAxis)

garbageData

public int garbageData(JLDataView v)
Remove points that exceed displayDuration.

Parameters:
v - DataView containing points
Returns:
Number of deleted points

addData

public void addData(JLDataView v,
                    double x,
                    double y)
Add data to dataview , perform fast update when possible and garbage old data (if a display duration is specified).

Parameters:
v - The dataview
x - x coordinates (real space)
y - y coordinates (real space)
See Also:
setDisplayDuration(double)

setTimePrecision

public void setTimePrecision(int milliseconds)
Sets the allowed margin to make a projection on a line on data show.

Parameters:
milliseconds - the margin, in milliseconds

getTimePrecision

public int getTimePrecision()
Returns the allowed margin to make a projection on a line on data show (default: 0).

Returns:
The allowed margin to make a projection on a line on data show (default: 0).

getNoValueString

public java.lang.String getNoValueString()
Used with saveDataFile(). Returns the String used to represent "no data" (default : "*").

Returns:
The String used to represent "no data"

setNoValueString

public void setNoValueString(java.lang.String noValueString)
Used with saveDataFile(). Sets the String used to represent "no data" (default : "*").

Parameters:
noValueString - The String used to represent "no data"

setPreferDialogForTable

public void setPreferDialogForTable(boolean preferDialog,
                                    boolean modal)
Sets if you prefer to use a JDialog with showTableXXX() methods instead of the classic JFrame

Parameters:
preferDialog - Prefer to have a dialog or not
modal - The dialog should be modal or not

setParentForTableDialog

public void setParentForTableDialog(java.awt.Frame parent)
Sets the parent that the "show table" dialog should have (in case you chose to have a dialog)

Parameters:
parent - The parent
See Also:
setPreferDialogForTable(boolean, boolean)

setParentForTableDialog

public void setParentForTableDialog(java.awt.Dialog parent)
Sets the parent that the "show table" dialog should have (in case you chose to have a dialog)

Parameters:
parent - The parent
See Also:
setPreferDialogForTable(boolean, boolean)

removeDataView

public void removeDataView(JLDataView view)

reset

public void reset()

reset

protected void reset(boolean showConfirmDialog)

main

public static void main(java.lang.String[] args)