DESY ACOP Beans Home

de.desy.acop.displayers
Class AcopChartReorg

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by de.desy.acop.displayers.AcopChartReorg
All Implemented Interfaces:
PopupManageable, CommonDisplayer, DataStateProvider, MultipleDataConsumer, MultipleDisplayer, MultipleAcopDisplayer<AcopGraphParameters>, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
AcopTrendChart

public class AcopChartReorg
extends javax.swing.JPanel
implements MultipleDisplayer, MultipleAcopDisplayer<AcopGraphParameters>, PopupManageable

AcopChartReorg is a wrapper for Acop which can present multiple graphs and allows setting of the most common Acop properties.

Author:
ikriznar
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String AXIS_TRACE_VISIBLE
           
static java.lang.String CHUBBY_LINES
           
protected  ColorManager colorManager
           
static java.lang.String CONSUMERS
           
protected  java.util.ArrayList<AcopChartConsumer> consumersList
           
protected  AbstractCustomizerPanel customizer
           
static java.lang.String LINE_STYLE
           
protected  int maxLinkIndex
           
static java.lang.String TITLE
           
static java.lang.String X_AUTOSCALE
           
static java.lang.String X_RANGE_MAX
           
static java.lang.String X_RANGE_MIN
           
static java.lang.String Y_AUTOSCALE
           
static java.lang.String Y_LOG_SCALE
           
static java.lang.String Y_RANGE_MAX
           
static java.lang.String Y_RANGE_MIN
           
 
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 de.desy.acop.displayers.tools.MultipleAcopDisplayer
DISPLAYER_PARAMETERS_PROPERTY
 
Fields inherited from interface com.cosylab.gui.displayers.CommonDisplayer
C_BIT_DESCRIPTIONS, C_BIT_MASK, C_COLOR, C_CONDITION_WHEN_CLEARED, C_CONDITION_WHEN_SET, C_DESCRIPTION, C_DISPLAY_NAME, C_FORMAT, C_GRAPH_MAX, C_GRAPH_MIN, C_MAXIMUM, C_MIN_STEP, C_MINIMUM, C_POSITION, C_PROPERTY_TYPE, C_SEQUENCE_LENGTH, C_UNITS
 
Fields inherited from interface com.cosylab.gui.displayers.DataStateProvider
DATA_STATE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AcopChartReorg()
          Constructs a new AcopChartReorg.
 
Method Summary
 void addConnectionParameters(ConnectionParameters parameters)
          Adds ConnectionParameters to the displayer.
 void addDisplayerParameters(AcopGraphParameters parameters)
          Adds AcopDisplayerParameters to this displayer.
 void autoScale()
          Autoscales the vertical and horizontal bounds to optimally include all values on all graphs.
protected  void autoScale(boolean xmx, boolean xmn, boolean ymx, boolean ymn)
           
 void autoScaleXOnce()
          Autoscales horizotantal axis.
 void autoScaleYOnce()
          Autoscales vertical axis.
protected  boolean canAutoScale()
           
 void cleanup()
          Performs general cleanup of displayer resources.
 Acop getAcop()
          Returns this component's Acop chart.
 ConnectionParameters[] getConnectionParameters()
          Returns all ConnectionParameters attached to this displayer.
<D extends DataConsumer>
D
getConsumer(java.lang.String name, java.lang.Class<D> type)
           Returns data consumer of specified data consumer type and for specified string name.
 DataConsumer[] getConsumers()
          Returns all data consumers created by this multiple data consumer.
 AbstractCustomizerPanel getCustomizer()
          Returns the Customizer instance for this component.
 DataState getDataState()
          Returns data quality state.
 AcopGraphParameters[] getDisplayerParameters()
          Returns an array of all AcopDisplayerParameters associated with this displayer.
 AcopDisplayMode getDisplayMode()
          Returns display mode of this chart.
 PopupManager getPopupManager()
          Returns popup manager, which manages popup menu.
 java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
          Returns array of supported data consumer types, which can be used as parameter and returnned with getConsumer(String,Class) method.
 java.lang.String getTitle()
          Returns the title of the chart.
 double getXRangeMax()
          Returns the maximum value for x axis.
 double getXRangeMin()
          Returns the minimum value for x axis.
 double getYRangeMax()
          Returns the maximum value for y axis.
 double getYRangeMin()
          Returns the minimum value for y axis.
 boolean isAxisTraceVisible()
          Returns true if axis trace is visible.
 boolean isBestScale()
          Returns true if best scale is switched on.
 boolean isChubbyLines()
          Returns true if the lines are chubby.
 boolean isDragEnabled()
          Returns true if drag is enabled.
 boolean isDropEnabled()
          Returns true if drop is enabled.
 boolean isPropertiesPopupEnabled()
          Returns true if Preferences item is enabled in the popup menu.
 boolean isShowGrid()
          Returns true if grid lines are visible.
 boolean isSuspended()
          Returns true if GUI updates are suspended.
 boolean isXAutoScale()
          Returns true if horizontal axis is automatically scaled to include all values in the chart.
 boolean isYAutoScale()
          Returns true if vertical axis is scaled automatically to include all values in the chart.
 boolean isYLogScale()
          Returns true if the vertical axis is in logarithmic scale.
static void main(java.lang.String[] args)
           
 void releaseConsumer(DataConsumer consumer)
          Requests frm this multiple consumer to release all resources connectet to provided single consumer.
 DataSource removeConnectionParameters(ConnectionParameters parameters)
          Removes a ConnectionParameters from this displayer.
 DataSource removeDisplayerParameters(AcopGraphParameters parameters)
          Removes a AcopDisplayerParameters from this displayer.
 void resetZoom()
          If Acop is in zoom mode, this method will return it to the initial state.
 void resume()
          Resumes updates of GUI component.
 void setAxisTraceVisible(boolean visible)
          Enables/disables the axis trace
 void setBestScale(boolean bestScale)
          Toggles the best scale.
 void setChubbyLines(boolean chubbyLines)
          Sets chubby lines option.
 void setConnectionParameters(ConnectionParameters[] parameters)
          Sets ConnectionParameter to the displayer.
 void setDisplayerParameters(AcopGraphParameters[] parameters)
          Sets AcopDisplayerParameters to this displayer.
 void setDisplayMode(AcopDisplayMode displayMode)
          Sets the display mode to this chart (plots of all consumers have the same display mode).
 void setDragEnabled(boolean enabled)
          Enables/disables mouse dragging.
 void setDropEnabled(boolean enabled)
          Enable/disable the mouse drop.
 void setPropertiesPopupEnabled(boolean enable)
          Enables/disables Preferences item in the popup menu.
 void setShowGrid(boolean show)
          Toggles the visibility of grid lines.
 void setTitle(java.lang.String title)
          Sets the title for this chart.
 void setXAutoScale(boolean autoScale)
          Sets the horizontal axis auto scale option.
 void setXRangeMax(double rangeMax)
          Sets maximum value for x axis.
 void setXRangeMin(double rangeMin)
          Sets the minimum value for x axis.
 void setYAutoScale(boolean autoScale)
          Enables/disables vertical axis autoscaling.
 void setYLogScale(boolean logScale)
          Sets the logarithmic scale of the vertical axis.
 void setYRangeMax(double rangeMax)
          Sets the maximum value for y axis.
 void setYRangeMin(double rangeMin)
          Sets the minimum value for y axis.
 void showLegendDialog()
          Shows the legend dialog for this chart.
 void suspend()
          Suspends all updates of displayer.
protected  AcopGraphParameters synchronizeGraphParameters(AcopGraphParameters parameters)
           
 void updateXScale(AcopChartConsumer consumer)
          Updates chart's x scale using so the preferred min/max of the given consumer are included in this chart's bounds.
protected  void updateXScaleOnRemove(AcopChartConsumer consumer)
           
 void updateYScale(AcopChartConsumer consumer)
          Updates chart's y scale using so the preferred min/max of the given consumer are included in this chart's bounds.
protected  void updateYScaleOnRemove(AcopChartConsumer consumer)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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
 
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
 
Methods inherited from interface com.cosylab.gui.displayers.DataStateProvider
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

TITLE

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

LINE_STYLE

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

CHUBBY_LINES

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

AXIS_TRACE_VISIBLE

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

X_AUTOSCALE

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

Y_AUTOSCALE

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

Y_LOG_SCALE

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

X_RANGE_MAX

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

X_RANGE_MIN

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

Y_RANGE_MAX

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

Y_RANGE_MIN

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

CONSUMERS

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

colorManager

protected ColorManager colorManager

maxLinkIndex

protected int maxLinkIndex

consumersList

protected java.util.ArrayList<AcopChartConsumer> consumersList

customizer

protected AbstractCustomizerPanel customizer
Constructor Detail

AcopChartReorg

public AcopChartReorg()
Constructs a new AcopChartReorg.

Method Detail

getAcop

public Acop getAcop()
Returns this component's Acop chart.

Returns:
the Acop

cleanup

public void cleanup()
Description copied from interface: CommonDisplayer
Performs general cleanup of displayer resources. All by displayer issued object are not valid any more after cleanup. Displayer positions itself in initial state and DataState is changed to NOT_INITIALIZED state.

Specified by:
cleanup in interface CommonDisplayer

suspend

public void suspend()
Description copied from interface: CommonDisplayer
Suspends all updates of displayer. Displayer might receive data change updates, but does not call redraw on GUI components, which is time and CPU consuming.

Specified by:
suspend in interface CommonDisplayer

resume

public void resume()
Description copied from interface: CommonDisplayer
Resumes updates of GUI component.

Specified by:
resume in interface CommonDisplayer
See Also:
CommonDisplayer.suspend()

isSuspended

public boolean isSuspended()
Description copied from interface: CommonDisplayer
Returns true if GUI updates are suspended.

Specified by:
isSuspended in interface CommonDisplayer
Returns:
true if GUI updates are suspended

getDataState

public DataState getDataState()
Description copied from interface: DataStateProvider
Returns data quality state. This property is changed by data consumer interface. In case of multiple displayer, this state indicates integral state for all contained data consumers.

Specified by:
getDataState in interface DataStateProvider
Returns:
dynamic data quality state

getConsumer

public <D extends DataConsumer> D getConsumer(java.lang.String name,
                                              java.lang.Class<D> type)
Description copied from interface: MultipleDataConsumer

Returns data consumer of specified data consumer type and for specified string name. The organization of data is indicated with name (list, table, tree organization). Multiple consumer might interprete this by it's own preferences or abilities. The name of returned consuer must equals to provided name.

Example. Names: PS1/current, PS1/readback, PS2/current, PS2/readback migth table displayer interprete as two rows (PS1 and PS2) wtih two columns (current and readback). Tree displayer migth interprete this names as two branches with two subbranches.

Note that name is not fixed consumer property. Some displayers migth expect for name to be same as DISPLAY_NAME and is changed if display name is changed.

Specified by:
getConsumer in interface MultipleDataConsumer
Parameters:
name - organized data name
type - required data soncumer type
Returns:
newly allocated consumer for required name and type

releaseConsumer

public void releaseConsumer(DataConsumer consumer)
Description copied from interface: MultipleDataConsumer
Requests frm this multiple consumer to release all resources connectet to provided single consumer. Provided consumer must be created by this multiple consumer.

Specified by:
releaseConsumer in interface MultipleDataConsumer
Parameters:
consumer - the consumer to be released

getConsumers

public DataConsumer[] getConsumers()
Description copied from interface: MultipleDataConsumer
Returns all data consumers created by this multiple data consumer.

Specified by:
getConsumers in interface MultipleDataConsumer
Returns:
all data consumers created by this multiple data consumer

getSupportedConsumerTypes

public java.lang.Class<DataConsumer>[] getSupportedConsumerTypes()
Description copied from interface: MultipleDataConsumer
Returns array of supported data consumer types, which can be used as parameter and returnned with getConsumer(String,Class) method.

Specified by:
getSupportedConsumerTypes in interface MultipleDataConsumer
Returns:
array of supported data consumer types

addDisplayerParameters

public void addDisplayerParameters(AcopGraphParameters parameters)
                            throws CommonException,
                                   java.beans.PropertyVetoException
Description copied from interface: MultipleAcopDisplayer
Adds AcopDisplayerParameters to this displayer. All previous connections are kept and this one is added to the list. Upon adding the displayer should connect to the remote point specified by this parameters and adapt the screen according to other supplied parameters.

Specified by:
addDisplayerParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Parameters:
parameters - remote connection point and screen parameters
Throws:
CommonException - if setting failed due to connection problem
java.beans.PropertyVetoException - if setting the property failed because of improper parameters

addConnectionParameters

public void addConnectionParameters(ConnectionParameters parameters)
                             throws CommonException,
                                    java.beans.PropertyVetoException
Description copied from interface: MultipleAcopDisplayer
Adds ConnectionParameters to the displayer. Upon adding ConnectionParameters the displayer should create a DataSource and connect it to the remote channe as specified by the parameters.

Specified by:
addConnectionParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Throws:
CommonException - if setting failed due to connection problem
java.beans.PropertyVetoException - if setting the property failed because of improper parameters

synchronizeGraphParameters

protected AcopGraphParameters synchronizeGraphParameters(AcopGraphParameters parameters)

getDisplayerParameters

public AcopGraphParameters[] getDisplayerParameters()
Description copied from interface: MultipleAcopDisplayer
Returns an array of all AcopDisplayerParameters associated with this displayer.

Specified by:
getDisplayerParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Returns:
an array of all parameters

getConnectionParameters

public ConnectionParameters[] getConnectionParameters()
Description copied from interface: MultipleAcopDisplayer
Returns all ConnectionParameters attached to this displayer.

Specified by:
getConnectionParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Returns:
an array of all connection parameters

removeDisplayerParameters

public DataSource removeDisplayerParameters(AcopGraphParameters parameters)
Description copied from interface: MultipleAcopDisplayer
Removes a AcopDisplayerParameters from this displayer. DataSource that belongs to this parameters should be released (via AdapterFactory) and all resource associated with this parameters in the displayer should be released.

Specified by:
removeDisplayerParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Parameters:
parameters - parameters to be removed
Returns:
DataSource associated with this parameters

removeConnectionParameters

public DataSource removeConnectionParameters(ConnectionParameters parameters)
Description copied from interface: MultipleAcopDisplayer
Removes a ConnectionParameters from this displayer. DataSource that belongs to this parameters should be released (via AdapterFactory) and all resource associated with this parameters in the displayer should be released.

Specified by:
removeConnectionParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Parameters:
parameters - connection to be removed
Returns:
DataSource associated with this parameters

setDisplayerParameters

public void setDisplayerParameters(AcopGraphParameters[] parameters)
                            throws CommonException,
                                   java.beans.PropertyVetoException
Description copied from interface: MultipleAcopDisplayer
Sets AcopDisplayerParameters to this displayer. All previous connections should be terminated and then the new added. If the new array includes parameters that are already connected with this displayer, those connections do not need to be terminated. At the end of procedure the displayer should have only connections specified by the array parameters. Displayer should not allow two have two identical parameters. Parameters are identical if the DisplayerParameters.equals(Object) returns true.

Specified by:
setDisplayerParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Parameters:
parameters - remote connections points
Throws:
CommonException - if setting failed due to connection problem
java.beans.PropertyVetoException - if setting the property failed because of improper parameters

setConnectionParameters

public void setConnectionParameters(ConnectionParameters[] parameters)
                             throws CommonException,
                                    java.beans.PropertyVetoException
Description copied from interface: MultipleAcopDisplayer
Sets ConnectionParameter to the displayer. All previous connections should be terminated and then the new added. If the new array includes parameters that are already connected with this displayer, those connections do not need to be terminated. At the end of procedure the displayer should have only connections specified by the array parameters.

Specified by:
setConnectionParameters in interface MultipleAcopDisplayer<AcopGraphParameters>
Parameters:
parameters - remote connections points
Throws:
CommonException - if setting failed due to connection problem
java.beans.PropertyVetoException - if setting the property failed because of improper parameters

updateYScale

public void updateYScale(AcopChartConsumer consumer)
Updates chart's y scale using so the preferred min/max of the given consumer are included in this chart's bounds.

Parameters:
consumer - the consumer, whose bounds changed

updateYScaleOnRemove

protected void updateYScaleOnRemove(AcopChartConsumer consumer)

updateXScale

public void updateXScale(AcopChartConsumer consumer)
Updates chart's x scale using so the preferred min/max of the given consumer are included in this chart's bounds.

Parameters:
consumer - the consumer, whose bounds changed

updateXScaleOnRemove

protected void updateXScaleOnRemove(AcopChartConsumer consumer)

setDragEnabled

public void setDragEnabled(boolean enabled)
Enables/disables mouse dragging. Dragging can only be enabled if this component uses CosyTransferHandler.

Parameters:
enabled -

isDragEnabled

public boolean isDragEnabled()
Returns true if drag is enabled.

Returns:
true if drag is enabled

setDropEnabled

public void setDropEnabled(boolean enabled)
Enable/disable the mouse drop. Drop can only be enabled if this component uses CosyTransferHandler.

Parameters:
enabled -

isDropEnabled

public boolean isDropEnabled()
Returns true if drop is enabled.

Returns:
true if drop is enabled

getPopupManager

public PopupManager getPopupManager()
Description copied from interface: PopupManageable
Returns popup manager, which manages popup menu.

Specified by:
getPopupManager in interface PopupManageable
Returns:
returns popup manager, which manages popup menu

getCustomizer

public AbstractCustomizerPanel getCustomizer()
Returns the Customizer instance for this component.

Returns:
the Customizer instance for this component.

setPropertiesPopupEnabled

public void setPropertiesPopupEnabled(boolean enable)
Enables/disables Preferences item in the popup menu.

Parameters:
enable -

isPropertiesPopupEnabled

public boolean isPropertiesPopupEnabled()
Returns true if Preferences item is enabled in the popup menu.

Returns:

autoScale

public void autoScale()
Autoscales the vertical and horizontal bounds to optimally include all values on all graphs.


autoScale

protected void autoScale(boolean xmx,
                         boolean xmn,
                         boolean ymx,
                         boolean ymn)

canAutoScale

protected boolean canAutoScale()

autoScaleXOnce

public void autoScaleXOnce()
Autoscales horizotantal axis. The axis is scaled only once. If the new value is out of bounds, tha axis won't be rescaled automatically.


autoScaleYOnce

public void autoScaleYOnce()
Autoscales vertical axis. The axis is scaled only once. If the new value is out of bounds, tha axis won't be rescaled automatically.


resetZoom

public void resetZoom()
If Acop is in zoom mode, this method will return it to the initial state.


isAxisTraceVisible

public boolean isAxisTraceVisible()
Returns true if axis trace is visible.

Returns:
true if axis trace is visible

setAxisTraceVisible

public void setAxisTraceVisible(boolean visible)
Enables/disables the axis trace

Parameters:
visible - true if axis trace should be visible
See Also:
Acop.setCursorMarkerMode(int)

getTitle

public java.lang.String getTitle()
Returns the title of the chart.

Returns:
the title

setTitle

public void setTitle(java.lang.String title)
Sets the title for this chart.

Parameters:
title - new title for the chart

isXAutoScale

public boolean isXAutoScale()
Returns true if horizontal axis is automatically scaled to include all values in the chart.

Returns:
the xAutoScale

setXAutoScale

public void setXAutoScale(boolean autoScale)
Sets the horizontal axis auto scale option.

Parameters:
autoScale - true if autoscale should be turned on

getXRangeMax

public double getXRangeMax()
Returns the maximum value for x axis.

Returns:
maximum horizontal value that the chart can show

setXRangeMax

public void setXRangeMax(double rangeMax)
Sets maximum value for x axis.

Parameters:
new - horizontal maximum

getXRangeMin

public double getXRangeMin()
Returns the minimum value for x axis.

Returns:
minimum horizontal value that the chart can show

setXRangeMin

public void setXRangeMin(double rangeMin)
Sets the minimum value for x axis.

Parameters:
rangeMin - new horizontal minimum

isYAutoScale

public boolean isYAutoScale()
Returns true if vertical axis is scaled automatically to include all values in the chart.

Returns:
true if autoscale is turned on

setYAutoScale

public void setYAutoScale(boolean autoScale)
Enables/disables vertical axis autoscaling.

Parameters:
autoScale - true is autoscale should be turned on

isYLogScale

public boolean isYLogScale()
Returns true if the vertical axis is in logarithmic scale.

Returns:
true if y axis is logarithmic

setYLogScale

public void setYLogScale(boolean logScale)
Sets the logarithmic scale of the vertical axis.

Parameters:
logScale - true if axis should have logarithmic scale

getYRangeMax

public double getYRangeMax()
Returns the maximum value for y axis.

Returns:
maximum vertical value that the chart can show

setYRangeMax

public void setYRangeMax(double rangeMax)
Sets the maximum value for y axis.

Parameters:
new - maximum vertical value

getYRangeMin

public double getYRangeMin()
Returns the minimum value for y axis.

Returns:
minimum vertical value that the chart can show

setYRangeMin

public void setYRangeMin(double rangeMin)
Sets the minimum value for y axis.

Parameters:
new - minimum vertical value

isChubbyLines

public boolean isChubbyLines()
Returns true if the lines are chubby.

Returns:
true if chubby lines are drawn

setChubbyLines

public void setChubbyLines(boolean chubbyLines)
Sets chubby lines option. If chubby lines are selected, widths of all plots are doubled.

Parameters:
chubbyLines - true if chubby lines should be drawn

getDisplayMode

public AcopDisplayMode getDisplayMode()
Returns display mode of this chart.

Returns:
the displayMode

setDisplayMode

public void setDisplayMode(AcopDisplayMode displayMode)
Sets the display mode to this chart (plots of all consumers have the same display mode). If line style is null individual display modes of consumers are allowed.

Parameters:
displayMode - the displayMode to set

setBestScale

public void setBestScale(boolean bestScale)
Toggles the best scale. When best scale is on, chart scales the axes according to best visibility of data.

Parameters:
bestScale -

isBestScale

public boolean isBestScale()
Returns true if best scale is switched on.

Returns:
true if best scale is on

setShowGrid

public void setShowGrid(boolean show)
Toggles the visibility of grid lines.

Parameters:
show - true if grid is visible

isShowGrid

public boolean isShowGrid()
Returns true if grid lines are visible.

Returns:
true if grid is visible

showLegendDialog

public void showLegendDialog()
Shows the legend dialog for this chart.


main

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


Copyright © 2010. All Rights Reserved.