Class GJAbstractGraph
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.jdesktop.swingx.JXPanel
-
- kcl.waterloo.graphics.GJBasicPanel
-
- kcl.waterloo.graphics.GJAbstractGraph0
-
- kcl.waterloo.graphics.GJAbstractGraph1
-
- kcl.waterloo.graphics.GJAbstractGraph
-
- All Implemented Interfaces:
- java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.Scrollable, GJAxisSupportInterface, GJGraphInterface, GJLayerInterface<GJGraphInterface>, GJLinkableInterface, GJObservableInterface
- Direct Known Subclasses:
- GJGraph
public abstract class GJAbstractGraph extends GJAbstractGraph1
Abstract class implementing theGJGraphInterface. At present, the only concrete implementation is through theGJGraphclass. WhileGJGraphinstances can be independent of their containers, they will normally be added to aGJAbstractGraphContainerinstance.GJAbstractGraph. Developed from the JXGraph class from the SwingLabs SwingX Project.
JXGraph was originally written by Romain Guy to display functions. See Filthy Rich Clients , C. Haase & R. Guy - Addison Wesley (2008).
GJAbstractGraph and its subclasses were developed to display experimental data.
-----------------------------------------------------------------------------
$Id: JXGraph.java 3671 2010-04-23 20:57:49Z kschaefe $
Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Lesser General Public License for more details.
You should have received a copy of the GNU Lesser Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-----------------------------------------------------------------------------This version is part of the Waterloo Scientific Graphics package from King's College London
The Waterloo Scientific Graphics library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Lesser General Public License for more details.
You should have received a copy of the GNU Lesser Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classGJAbstractGraph.GraphCyclerHandles keyboard input when the graph has focus.-
Nested classes/interfaces inherited from class kcl.waterloo.graphics.GJBasicPanel
GJBasicPanel.LocalTransferable
-
-
Field Summary
-
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.Componentadd(java.awt.Component c)Overriddenaddmethod.java.awt.Componentadd(java.awt.Component c, double x, double y)Add a component at the specified axis locationjava.awt.Componentadd(java.awt.Component c, double x, double y, int alignX, int alignY)Add a component at the specified axis location with the specified alignmentGJAbstractGraphadd(GJAbstractGraph gr)voidadd(GJAnnotationInterface<java.awt.geom.Path2D,GJGraphInterface,java.awt.Stroke,java.awt.Paint,java.awt.Font> a)Adds an annotation to the container for the graph.GJGraphInterfaceadd(GJGraphInterface graph)Adds a graph as a child of this graph.GJPlotInterfaceadd(GJPlotInterface plot)Adds a plot to the graph.GJPlotInterfaceadd(GJPlotInterface plot, boolean flag)Adds a plot to a graphvoidaddLink(java.lang.Object o)Adds an Object to the Links mapvoidaddListeners()Adds listeners or registers the mouse handle to be returned bygetMouseHandler.voidautoScale()Auto-scales the graph's axesvoidclearLinks()voidclearSelectedRegions()voidcreateAxes()Creates the objects for drawing axes for this graph.GJEditorInterfacefetchEditor()Returns the editor.voidfirePropertyChange(java.beans.PropertyChangeEvent pce)java.lang.Stringformat(double number)Returns a string for axis labels formatted by an internal formatterjava.util.ArrayList<GJPlotInterface>getAllPlots()GJAbstractGraphgetAncestorGraph()Returns the graph that forms the view in this graph's ancestry.java.util.ArrayList<java.awt.geom.Rectangle2D>getAvailableROI()java.awt.geom.Rectangle2DgetAxesBounds()Returns the bounds of the axes (xLeft, yBottom, width, height)doublegetAxesPadding()java.awt.ColorgetAxisColor()Returns the axis painting colorjava.awt.event.MouseAdaptergetAxisMouseHandler()Returns the mouse handler for this axisfloatgetAxisStrokeWeight()Returns the stroke thickness for axesGJAxisPanelgetBottomAxisPanel()Returns the panel for drawing the bottom axis.java.util.ArrayList<Category>getCategoricalLabels(GJAxisPanel.Orientation o)Returns the categorical data on the specified axisjavax.swing.JPopupMenugetContextMenu()GJGraphInterfacegetCurrentLayer()Returns the currently selected layerintgetCurrentLayerIndex()Returns the index of the current layer.java.awt.geom.Point2DgetCurrentMousePosition()java.awt.geom.Rectangle2D.DoublegetCurrentROI()java.awt.geom.Rectangle2DgetDataRange()Returns the data range for the x- and y-data of the plots for this graph.java.awt.geom.Point2DgetDragStart()GJAbstractGraphContainergetGraphContainer()Returns the container for this graph.GJGridInterfacegetGridInterface()java.awt.event.KeyListenergetKeyListener()GJGraphInterfacegetLayer(int n)Returns the layer at the specified indexjava.util.ArrayList<GJGraphInterface>getLayers()Returns a list of the layers for this graph.GJAxisPanelgetLeftAxisPanel()Returns the panel for drawing the left axis.java.util.ArrayList<java.lang.Object>getLinks()Returns the list of linked Objectsjava.text.NumberFormatgetMainFormatter()java.awt.ColorgetMajorGridColor()Returns the major grid painting colorfloatgetMajorGridStrokeWeight()Returns the stroke thickness for major gridsdoublegetMajorXHint()Returns the value for the hintdoublegetMajorYHint()Returns the value for the hintintgetMinorCountXHint()Returns a hint for the number of minor grids to paint per major grid division for the x-axis.intgetMinorCountYHint()Returns a hint for the number of minor grids to paint per major grid division for the y-axis.java.awt.ColorgetMinorGridColor()Returns the minor grid painting colorfloatgetMinorGridStrokeWeight()Returns the stroke thickness for minor gridsjava.awt.geom.Point2DgetMouseDown()java.awt.event.MouseAdaptergetMouseHandler()Returns a MouseAdapter for this component.javax.swing.JLabelgetMousePositionTextField()Returns a reference to a JLabel that will be updated with the mouse position (unless null).java.lang.StringgetMousePositionTextFormat()java.awt.event.MouseWheelListenergetMouseWheelHandler()java.util.ArrayList<GJPlotInterface>getPlotAt(double x, double y)Returns the plots below the screen pixel location specified.java.util.ArrayList<GJPlotInterface>getPlots()Returns the list of top plots associated with this graph.GJAxisPanelgetRightAxisPanel()Returns the panel for drawing the right axis.java.text.NumberFormatgetSecondFormatter()java.util.ArrayList<GJPlotInterface>getSelectedPlots()Returns a list of plot that are currently selected (e.g.GJAxisPanelgetTopAxisPanel()Returns the panel for drawing the top axis.java.lang.StringgetXLabel()Returns the string for the x-axis labeljava.lang.StringgetYLabel()Returns the string for the y-axis labelbooleanhasListeners(java.lang.String propertyName)Returns true if this instance has installed listeners.booleanhasSelfListener()Returns true if the implementing instance is a listener.intindexOf()Returns the index of this graph as a layer in the view.java.awt.geom.Point2DinverseTransform(int x, int y)Convenience caller to inverseTransformPoint(Point)booleanisBottomAxisLabelled()Returns true if the bottom axis is labelledbooleanisBottomAxisPainted()booleanisCategorical(GJAxisPanel.Orientation or)Returns true if any plot contained in this graph has categorical labels associated with its data for the specified axis.booleanisDragX()booleanisDragY()booleanisInnerAxisLabelled()Returns the flag for painting the inner axis labelsbooleanisInnerAxisPainted()Returns true if the inner axis is paintedbooleanisLeftAxisLabelled()Returns true if the left axis is labelledbooleanisLeftAxisPainted()booleanisMajorGridPainted()Returns true if the major grid is paintedbooleanisMinorGridPainted()Returns true if the minor grid is paintedbooleanisMouseTextAsInverse()booleanisPolar()booleanisRightAxisLabelled()Returns true if the right axis is labelledbooleanisRightAxisPainted()booleanisTextAsInverse()Returns true if the data shown in themousePositionTextFieldare inverse transformed.booleanisTightAxes()booleanisTopAxisLabelled()Returns true if the top axis is labelledbooleanisTopAxisPainted()booleanisXReversed()Returns true if the x-axis and data are painted in reversebooleanisYReversed()Returns true if the y-axis and data are painted in reversevoidlinkAxes(GJAbstractGraph gr)Links both the x- and y-axes of this graph to the specified graphvoidlinkAxesXX(GJAbstractGraph gr)Links the x-axis of this graph to that of the specified graph.voidlinkAxesXY(GJAbstractGraph gr)Links the x-axis of this graph to the y-axis of the specified graph.voidlinkAxesYX(GJAbstractGraph gr)Links the y-axis of this graph to the x-axis of the specified graph.voidlinkAxesYY(GJAbstractGraph gr)Links the y-axis of this graph to that of the specified graph.voidopenLinks()Makes any linked graphs referenced by this graph visible - housing them in a standard Waterloo swing hierarchy if required.GJGraphInterfaceplus(GJGraphInterface graph)Adds the specified graph as a new layer.GJPlotInterfaceplus(GJPlotInterface plot)Adds the specified plot as a top plotvoidpropertyChange(java.beans.PropertyChangeEvent evt)voidremove(java.awt.Component c)voidremove(GJPlotInterface plot)Removes a plot from this graph's hierarchy.voidremoveAllPlots()Removes all the plots currently associated with this layer.voidremoveLink(java.lang.Object o)Removes an Object from the Links mapvoidremoveListeners()voidremovePlotAt(int n)Removes the specified plot from this layer.voidresetView()Resets the view to the default view if it has been changed by the user by panning and zooming.voidsaveAsXML(java.lang.String fileName)Convenience method to save a graph to a "kclf" file.voidsetAntialiasing(boolean flag)voidsetAvailableROI(java.util.ArrayList<java.awt.geom.Rectangle2D> availableROI)voidsetAxesBounds(double x, double y, double w, double h)voidsetAxesBounds(java.awt.geom.Rectangle2D bounds)Sets the bounds of the axes (xLeft, yBottom, width, height)voidsetAxesBoundsAndOrigin(java.awt.geom.Rectangle2D bounds)Sets the view and the origin of the graph at the same time.voidsetAxesPadding(double axesPadding)voidsetAxisColor(java.awt.Color axisColor)Sets the color for painting the axisvoidsetAxisStrokeWeight(float axisStrokeWeight)Sets the width of lines for the axesvoidsetBackgroundPainted(boolean backPainted)Enables or disables the painting of background depending on the value of the parameter.voidsetBottomAxisLabelled(boolean flag)Sets the bottom axis is labelling flagvoidsetBottomAxisPainted(boolean flag)Sets the flag for painting the bottom axisvoidsetBottomAxisPanel(GJAxisPanel axp)voidsetCurrentLayer(GJGraphInterface layer)Sets the current layer for this graph.voidsetCurrentLayerIndex(int n)Sets the current layer by index.voidsetCurrentROI(java.awt.geom.Rectangle2D.Double currentROI)voidsetDragStart(java.awt.geom.Point2D dragStart)voidsetDragX(boolean dragX)voidsetDragY(boolean dragY)voidsetEditor(GJEditorInterface Editor)Sets the editor to be activated when this graph is double-clicked.voidsetGraphContainer(GJAbstractGraphContainer c)Sets theGJAbstractGraphContainerfor this graph.voidsetGraphContainer(GJAbstractGraphContainer c, java.awt.Insets insets)voidsetGridInterface(GJGridInterface gridInterface)voidsetInnerAxisLabelled(boolean textPainted)Sets the flag for painting the inner axis labelsvoidsetInnerAxisPainted(boolean flag)Sets the flag for painting the inner axisvoidsetKeyAntialiasing(java.lang.Object o)Sets the keyAntialiasing valuevoidsetLeftAxisLabelled(boolean flag)Sets the left axis is labelling flagvoidsetLeftAxisPainted(boolean flag)Sets the flag for painting the left axisvoidsetLeftAxisPanel(GJAxisPanel axp)voidsetLinks(java.util.ArrayList<java.lang.Object> links)Sets the list of linked objectsvoidsetMainFormatter(java.text.NumberFormat mainFormatter)voidsetMajorGridColor(java.awt.Color majorGridColor)Sets the color for painting the major gridvoidsetMajorGridPainted(boolean gridPainted)Sets the flag for painting the major gridvoidsetMajorGridStrokeWeight(float majorGridStrokeWeight)Sets the stroke thickness for major gridsvoidsetMajorXHint()Automatically sets the hintvoidsetMajorXHint(double majorX)Sets the hint to the specified valuevoidsetMajorYHint()Automatically sets the hintvoidsetMajorYHint(double majorY)Sets the hint to the specified valuevoidsetMinorCountXHint(int minorCountX)Provides a hint to how many minor grid lines should be painted.voidsetMinorCountYHint(int minorCountY)Provides a hint to how many minor grid lines should be painted.voidsetMinorGridColor(java.awt.Color minorGridColor)Sets the color for painting the minor gridvoidsetMinorGridPainted(boolean gridPainted)Sets the flag for painting the minor gridvoidsetMinorGridStrokeWeight(float minorGridStrokeWeight)Sets the stroke thickness for minor gridsvoidsetMouseDown(java.awt.geom.Point2D mouseDown)voidsetMousePositionTextField(javax.swing.JLabel t)Sets a reference to a JLabel that will be updated with the mouse position (unless null).voidsetMousePositionTextFormat(java.lang.String mousePositionTextFormat)voidsetMouseTextAsInverse(boolean mouseTextAsInverse)voidsetPlots(java.util.ArrayList<GJPlotInterface> list)Replaces the internal plot list (or its contents) with the suppliedArrayList(or its contents).voidsetPolar(boolean polar)voidsetReverseX(boolean flag)Sets the axis reversal flag for the x-axis.voidsetReverseY(boolean flag)Sets the axis reversal flag for the x-axis.voidsetRightAxisLabelled(boolean flag)Sets the right axis is labelling flagvoidsetRightAxisPainted(boolean flag)Sets the flag for painting the right axisvoidsetRightAxisPanel(GJAxisPanel axp)voidsetSecondFormatter(java.text.NumberFormat secondFormatter)voidsetSelectedPlots(java.util.ArrayList<GJPlotInterface> arr)Programmatically selects plots.voidsetTextAntialiasing(java.lang.Object o)Sets the textAntialiasing valuevoidsetTextAsInverse(boolean flag)Sets the textAsInverse flag.voidsetTightAxes(boolean tightAxes)voidsetTopAxisLabelled(boolean flag)Sets the top axis is labelling flagvoidsetTopAxisPainted(boolean flag)Sets the flag for painting the top axisvoidsetTopAxisPanel(GJAxisPanel axp)voidsetXLabel(java.lang.String s)Sets the string for the x-axis labelvoidsetYLabel(java.lang.String s)Sets the string for the x-axis labelvoidupdatePlots()-
Methods inherited from class kcl.waterloo.graphics.GJAbstractGraph1
formatXAxisLabel, formatYAxisLabel, getXAxisLabelRotation, getXTransform, getYAxisLabelRotation, getYTransform, setXTransform, setYTransform, transformPixelToPosition, transformPixelToPosition, transformPositionToPixel, transformPositionToPixel
-
Methods inherited from class kcl.waterloo.graphics.GJAbstractGraph0
convertPixelsToPosition, getOrigin, getOriginX, getOriginY, getPixelHeight, getPixelWidth, getXLeft, getXMax, getXMin, getXRight, getYBottom, getYMax, getYMin, getYTop, setOrigin, setOriginX, setOriginY, setXLeft, setXRight, setYBottom, setYTop, xPixelToPosition, xPixelToPosition, xPixelToPositioni, xPositionToPixel, xPositionToPixel, xPositionToPixeli, yPixelToPosition, yPixelToPosition, yPixelToPositioni, yPositionToPixel, yPositionToPixel, yPositionToPixeli
-
Methods inherited from class kcl.waterloo.graphics.GJBasicPanel
componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, getAllComponents, getID, getImage, getTransferable, getTransferable, isBackgroundPainted, isOnEDT, paintComponent, print, print, setID
-
Methods inherited from class org.jdesktop.swingx.JXPanel
getAlpha, getBackgroundPainter, getEffectiveAlpha, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, isInheritAlpha, isPaintBorderInsets, paint, setAlpha, setBackgroundPainter, setInheritAlpha, setOpaque, setPaintBorderInsets, setScrollableHeightHint, setScrollableTracksViewportHeight, setScrollableTracksViewportWidth, setScrollableWidthHint
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, addContainerListener, 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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface kcl.waterloo.observable.GJObservableInterface
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
createAxes
public final void createAxes()
Description copied from interface:GJGraphInterfaceCreates the objects for drawing axes for this graph.
-
plus
public final GJGraphInterface plus(GJGraphInterface graph)
Adds the specified graph as a new layer.- Parameters:
graph- the graph to add- Returns:
- the added graph
-
add
public final GJGraphInterface add(GJGraphInterface graph)
Description copied from interface:GJLayerInterfaceAdds a graph as a child of this graph. Provides support for nested graphs.- Returns:
- the added graph
-
add
public java.awt.Component add(java.awt.Component c)
Overriddenaddmethod. Performs some class checking to ensure the correctaddmethod gets called during XML deserialization. Users calling this method need to add appropriate constraints to the layout.- Overrides:
addin classjava.awt.Container- Parameters:
c-- Returns:
- the added Component
-
add
public GJAbstractGraph add(GJAbstractGraph gr)
-
add
public final void add(GJAnnotationInterface<java.awt.geom.Path2D,GJGraphInterface,java.awt.Stroke,java.awt.Paint,java.awt.Font> a)
Description copied from interface:GJGraphInterfaceAdds an annotation to the container for the graph. The annotation setGraph method is used to reference this graph in the annotation instance.- Parameters:
a- theGJAnnotationInterfaceto add
-
plus
public final GJPlotInterface plus(GJPlotInterface plot)
Adds the specified plot as a top plot- Parameters:
plot- the plot to add- Returns:
- the added plot
-
add
public final GJPlotInterface add(GJPlotInterface plot)
Description copied from interface:GJGraphInterfaceAdds a plot to the graph. Equivalent toadd(plot, true);- Parameters:
plot- the plot to add to the graph- Returns:
- a reference to the added plot
-
add
public final GJPlotInterface add(GJPlotInterface plot, boolean flag)
Description copied from interface:GJGraphInterfaceAdds a plot to a graph- Parameters:
plot- the plot to addflag- if true, the graph will be rescaled to accomodate the added plot.- Returns:
- a reference to the added plot
-
remove
public void remove(GJPlotInterface plot)
Description copied from interface:GJGraphInterfaceRemoves a plot from this graph's hierarchy.- Parameters:
plot- the plot to remove.
-
getPlotAt
public final java.util.ArrayList<GJPlotInterface> getPlotAt(double x, double y)
Returns the plots below the screen pixel location specified.- Parameters:
x- the x-Positiony- the y-Position- Returns:
- the plots as an ArrayList
-
getLayers
public final java.util.ArrayList<GJGraphInterface> getLayers()
Description copied from interface:GJLayerInterfaceReturns a list of the layers for this graph. The list includes this graph at element 0.- Returns:
- an ArrayList
-
getLayer
public final GJGraphInterface getLayer(int n)
Description copied from interface:GJLayerInterfaceReturns the layer at the specified index- Parameters:
n- the layer number - zero is this layer- Returns:
- the layer
-
getCurrentLayer
public final GJGraphInterface getCurrentLayer()
Description copied from interface:GJLayerInterfaceReturns the currently selected layer- Returns:
- a GJGraphInterface instance
-
setCurrentLayer
public final void setCurrentLayer(GJGraphInterface layer)
Description copied from interface:GJLayerInterfaceSets the current layer for this graph.
-
setCurrentLayerIndex
public final void setCurrentLayerIndex(int n)
Description copied from interface:GJLayerInterfaceSets the current layer by index.
-
getCurrentLayerIndex
public final int getCurrentLayerIndex()
Description copied from interface:GJLayerInterfaceReturns the index of the current layer.- Returns:
- the index
-
indexOf
public final int indexOf()
Description copied from interface:GJLayerInterfaceReturns the index of this graph as a layer in the view.- Returns:
- the index
-
getAncestorGraph
public final GJAbstractGraph getAncestorGraph()
Description copied from interface:GJLayerInterfaceReturns the graph that forms the view in this graph's ancestry.- Returns:
- the graph
-
add
public final java.awt.Component add(java.awt.Component c, double x, double y)Description copied from interface:GJGraphInterfaceAdd a component at the specified axis location- Parameters:
c- The component to addx- The x-axis positiony- The y-axis position- Returns:
- the added component
-
add
public final java.awt.Component add(java.awt.Component c, double x, double y, int alignX, int alignY)Description copied from interface:GJGraphInterfaceAdd a component at the specified axis location with the specified alignment- Parameters:
c- The component to addx- The x-axis positiony- The y-axis positionalignX- The X-alignment of the component on x,yalignY- The Y-alignment of the component on x,y- Returns:
- the added component
-
remove
public final void remove(java.awt.Component c)
- Overrides:
removein classjava.awt.Container
-
setGraphContainer
public final void setGraphContainer(GJAbstractGraphContainer c)
Description copied from interface:GJGraphInterfaceSets theGJAbstractGraphContainerfor this graph.- Parameters:
c- the Container to add this GJAbstractGraph to
-
setGraphContainer
public final void setGraphContainer(GJAbstractGraphContainer c, java.awt.Insets insets)
- Parameters:
c- theGJAbstractGraphContainerto add this GJAbstractGraph toinsets- an Insets object specifying the margins
-
getGraphContainer
public final GJAbstractGraphContainer getGraphContainer()
Description copied from interface:GJGraphInterfaceReturns the container for this graph. Null if the graph has no container.- Returns:
- the GJAbstractGraphContainer
-
isInnerAxisPainted
public final boolean isInnerAxisPainted()
Description copied from interface:GJAxisSupportInterfaceReturns true if the inner axis is painted- Returns:
- the flag
-
setInnerAxisPainted
public final void setInnerAxisPainted(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the inner axis- Parameters:
flag- the boolean value
-
isInnerAxisLabelled
public final boolean isInnerAxisLabelled()
Description copied from interface:GJAxisSupportInterfaceReturns the flag for painting the inner axis labels- Returns:
- the flag
-
setInnerAxisLabelled
public final void setInnerAxisLabelled(boolean textPainted)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the inner axis labels- Parameters:
textPainted- the boolean value
-
isMajorGridPainted
public final boolean isMajorGridPainted()
Description copied from interface:GJAxisSupportInterfaceReturns true if the major grid is painted- Returns:
- the flag
-
setMajorGridPainted
public final void setMajorGridPainted(boolean gridPainted)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the major grid- Parameters:
gridPainted- the boolean value
-
isMinorGridPainted
public final boolean isMinorGridPainted()
Description copied from interface:GJAxisSupportInterfaceReturns true if the minor grid is painted- Returns:
- the flag
-
setMinorGridPainted
public final void setMinorGridPainted(boolean gridPainted)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the minor grid- Parameters:
gridPainted- the boolean value
-
isLeftAxisPainted
public final boolean isLeftAxisPainted()
- Returns:
- true if the left axis is painted
-
isRightAxisPainted
public final boolean isRightAxisPainted()
- Returns:
- true if the right axis is painted
-
isTopAxisPainted
public final boolean isTopAxisPainted()
- Returns:
- true if the top axis is painted
-
isBottomAxisPainted
public final boolean isBottomAxisPainted()
- Returns:
- true if the bottom axis is painted
-
isLeftAxisLabelled
public final boolean isLeftAxisLabelled()
Description copied from interface:GJAxisSupportInterfaceReturns true if the left axis is labelled- Returns:
- the label flag
-
setLeftAxisLabelled
public final void setLeftAxisLabelled(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the left axis is labelling flag- Parameters:
flag- the label flag
-
isRightAxisLabelled
public final boolean isRightAxisLabelled()
Description copied from interface:GJAxisSupportInterfaceReturns true if the right axis is labelled- Returns:
- the label flag
-
setRightAxisLabelled
public final void setRightAxisLabelled(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the right axis is labelling flag- Parameters:
flag- the label flag
-
isTopAxisLabelled
public final boolean isTopAxisLabelled()
Description copied from interface:GJAxisSupportInterfaceReturns true if the top axis is labelled- Returns:
- the label flag
-
setTopAxisLabelled
public final void setTopAxisLabelled(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the top axis is labelling flag- Parameters:
flag- the label flag
-
isBottomAxisLabelled
public final boolean isBottomAxisLabelled()
Description copied from interface:GJAxisSupportInterfaceReturns true if the bottom axis is labelled- Returns:
- the label flag
-
setBottomAxisLabelled
public final void setBottomAxisLabelled(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the bottom axis is labelling flag- Parameters:
flag- the label flag
-
getLeftAxisPanel
public final GJAxisPanel getLeftAxisPanel()
Description copied from interface:GJAxisSupportInterfaceReturns the panel for drawing the left axis.- Returns:
- a GJAxisPanel instance
-
setLeftAxisPanel
public final void setLeftAxisPanel(GJAxisPanel axp)
-
getRightAxisPanel
public final GJAxisPanel getRightAxisPanel()
Description copied from interface:GJAxisSupportInterfaceReturns the panel for drawing the right axis.- Returns:
- a GJAxisPanel instance
-
setRightAxisPanel
public final void setRightAxisPanel(GJAxisPanel axp)
-
getTopAxisPanel
public final GJAxisPanel getTopAxisPanel()
Description copied from interface:GJAxisSupportInterfaceReturns the panel for drawing the top axis.- Returns:
- a GJAxisPanel instance
-
setTopAxisPanel
public final void setTopAxisPanel(GJAxisPanel axp)
-
getBottomAxisPanel
public final GJAxisPanel getBottomAxisPanel()
Description copied from interface:GJAxisSupportInterfaceReturns the panel for drawing the bottom axis.- Returns:
- a GJAxisPanel instance
-
setBottomAxisPanel
public final void setBottomAxisPanel(GJAxisPanel axp)
-
setBackgroundPainted
public final void setBackgroundPainted(boolean backPainted)
Description copied from class:GJBasicPanelEnables or disables the painting of background depending on the value of the parameter. Background painting is enabled by default.
- Specified by:
setBackgroundPaintedin interfaceGJGraphInterface- Overrides:
setBackgroundPaintedin classGJBasicPanel- Parameters:
backPainted- if true, axis labels are painted- See Also:
GJBasicPanel.isBackgroundPainted(),JComponent.setBackground(Color)
-
getMajorGridColor
public final java.awt.Color getMajorGridColor()
Description copied from interface:GJAxisSupportInterfaceReturns the major grid painting color- Returns:
- the color
-
setMajorGridColor
public final void setMajorGridColor(java.awt.Color majorGridColor)
Description copied from interface:GJAxisSupportInterfaceSets the color for painting the major grid- Parameters:
majorGridColor- the color
-
getMinorGridColor
public final java.awt.Color getMinorGridColor()
Description copied from interface:GJAxisSupportInterfaceReturns the minor grid painting color- Returns:
- the color
-
setMinorGridColor
public final void setMinorGridColor(java.awt.Color minorGridColor)
Description copied from interface:GJAxisSupportInterfaceSets the color for painting the minor grid- Parameters:
minorGridColor- the color
-
getMajorXHint
public final double getMajorXHint()
Description copied from interface:GJAxisSupportInterfaceReturns the value for the hint- Returns:
- the value
-
setMajorXHint
public final void setMajorXHint()
Description copied from interface:GJAxisSupportInterfaceAutomatically sets the hint
-
setMajorXHint
public final void setMajorXHint(double majorX)
Description copied from interface:GJAxisSupportInterfaceSets the hint to the specified value- Parameters:
majorX- the value
-
setMinorCountXHint
public final void setMinorCountXHint(int minorCountX)
Description copied from interface:GJAxisSupportInterfaceProvides a hint to how many minor grid lines should be painted.- Parameters:
minorCountX- number for the x-axis
-
getMajorYHint
public final double getMajorYHint()
Description copied from interface:GJAxisSupportInterfaceReturns the value for the hint- Returns:
- the value
-
setMajorYHint
public final void setMajorYHint()
Description copied from interface:GJAxisSupportInterfaceAutomatically sets the hint
-
setMajorYHint
public final void setMajorYHint(double majorY)
Description copied from interface:GJAxisSupportInterfaceSets the hint to the specified value- Parameters:
majorY- the value
-
getMinorCountXHint
public final int getMinorCountXHint()
Description copied from interface:GJAxisSupportInterfaceReturns a hint for the number of minor grids to paint per major grid division for the x-axis.- Returns:
- an int
-
getMinorCountYHint
public final int getMinorCountYHint()
Description copied from interface:GJAxisSupportInterfaceReturns a hint for the number of minor grids to paint per major grid division for the y-axis.- Returns:
- an int
-
setMinorCountYHint
public final void setMinorCountYHint(int minorCountY)
Description copied from interface:GJAxisSupportInterfaceProvides a hint to how many minor grid lines should be painted.- Parameters:
minorCountY- number for the y-axis
-
setAxesBoundsAndOrigin
public final void setAxesBoundsAndOrigin(java.awt.geom.Rectangle2D bounds)
Sets the view and the origin of the graph at the same time. The view minimum boundaries are defined by the location of the rectangle passed as parameter. The width and height of the rectangle define the distance between the minimum and maximum boundaries:
- xLeft: bounds.getX()
- yBottom: bounds.getY()
- yTop: bounds.getMaxX() (xLeft + bounds.getWidth())
- xRight: bounds.getMaxY() (yBottom + bounds.getHeight())
The origin is located at the center of the view. Its coordinates are defined by calling bounds.getCenterX() and bounds.getCenterY().
- Parameters:
bounds- the rectangle defining the graph's view and its origin
-
setAxesBounds
public final void setAxesBounds(double x, double y, double w, double h)
-
setAxesBounds
public final void setAxesBounds(java.awt.geom.Rectangle2D bounds)
Description copied from interface:GJAxisSupportInterfaceSets the bounds of the axes (xLeft, yBottom, width, height)- Parameters:
bounds- a Rectangle2D
-
getAxesBounds
public final java.awt.geom.Rectangle2D getAxesBounds()
Description copied from interface:GJAxisSupportInterfaceReturns the bounds of the axes (xLeft, yBottom, width, height)- Returns:
- a Rectangle2D
-
resetView
public final void resetView()
Resets the view to the default view if it has been changed by the user by panning and zooming. The default view is defined by the view last specified in a constructor call or a call to the methods
#setAxesBounds(Rectangle2D)and#setAxesBoundsAndOrigin(Rectangle2D).
-
updatePlots
public final void updatePlots()
-
getDataRange
public final java.awt.geom.Rectangle2D getDataRange()
Returns the data range for the x- and y-data of the plots for this graph. This range takes no account of the size of markers and does not require the plot to have been rendered to the graphics device.- Returns:
- the data range as a Rectangle2D object [X min, Y min ,width,height]
-
getAxisColor
public final java.awt.Color getAxisColor()
Description copied from interface:GJAxisSupportInterfaceReturns the axis painting color- Returns:
- the color
-
setAxisColor
public final void setAxisColor(java.awt.Color axisColor)
Description copied from interface:GJAxisSupportInterfaceSets the color for painting the axis- Parameters:
axisColor- the color
-
getXLabel
public final java.lang.String getXLabel()
Description copied from interface:GJAxisSupportInterfaceReturns the string for the x-axis label- Returns:
- the String
-
setXLabel
public final void setXLabel(java.lang.String s)
Description copied from interface:GJAxisSupportInterfaceSets the string for the x-axis label- Parameters:
s- the String
-
getYLabel
public final java.lang.String getYLabel()
Description copied from interface:GJAxisSupportInterfaceReturns the string for the y-axis label- Returns:
- the String
-
setYLabel
public final void setYLabel(java.lang.String s)
Description copied from interface:GJAxisSupportInterfaceSets the string for the x-axis label- Parameters:
s- the String
-
getPlots
public final java.util.ArrayList<GJPlotInterface> getPlots()
Description copied from interface:GJGraphInterfaceReturns the list of top plots associated with this graph. It is recommended that this should be a clone of the internal ArrayList.- Returns:
- a ArrayList
-
getAllPlots
public final java.util.ArrayList<GJPlotInterface> getAllPlots()
-
setPlots
public final void setPlots(java.util.ArrayList<GJPlotInterface> list)
Description copied from interface:GJGraphInterfaceReplaces the internal plot list (or its contents) with the suppliedArrayList(or its contents). Copying the contents is recommended. This method is called during de-serialization of xml files. It is public for that reason only and is not intended for use elsewhere.- Parameters:
list- aArrayList<GJPlotInterface>
-
removePlotAt
public final void removePlotAt(int n)
Removes the specified plot from this layer.
- Parameters:
n-
-
removeAllPlots
public final void removeAllPlots()
Removes all the plots currently associated with this layer.
-
removeListeners
public final void removeListeners()
-
addListeners
public final void addListeners()
Description copied from interface:GJGraphInterfaceAdds listeners or registers the mouse handle to be returned bygetMouseHandler.
-
inverseTransform
public final java.awt.geom.Point2D inverseTransform(int x, int y)Convenience caller to inverseTransformPoint(Point)- Parameters:
x- Position in the graphy- Position in the graph- Returns:
- Point rotated,scaled and translated according to the graphContainer's Rotation and Zoom settings. Null if there is no graphContainer associated with this graph
-
autoScale
public final void autoScale()
Description copied from interface:GJGraphInterfaceAuto-scales the graph's axes
-
getMousePositionTextField
public final javax.swing.JLabel getMousePositionTextField()
Description copied from interface:GJGraphInterfaceReturns a reference to a JLabel that will be updated with the mouse position (unless null).- Returns:
- a JLabel
-
setMousePositionTextField
public final void setMousePositionTextField(javax.swing.JLabel t)
Description copied from interface:GJGraphInterfaceSets a reference to a JLabel that will be updated with the mouse position (unless null).- Parameters:
t- a JLabel
-
setKeyAntialiasing
public final void setKeyAntialiasing(java.lang.Object o)
Sets the keyAntialiasing value- Parameters:
o-
-
setAntialiasing
public final void setAntialiasing(boolean flag)
-
setTextAntialiasing
public final void setTextAntialiasing(java.lang.Object o)
Sets the textAntialiasing value- Parameters:
o-
-
setReverseX
public final void setReverseX(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the axis reversal flag for the x-axis.
-
isXReversed
public final boolean isXReversed()
Description copied from interface:GJAxisSupportInterfaceReturns true if the x-axis and data are painted in reverse- Returns:
- the reversal flag
-
setReverseY
public final void setReverseY(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the axis reversal flag for the x-axis.
-
isYReversed
public final boolean isYReversed()
Description copied from interface:GJAxisSupportInterfaceReturns true if the y-axis and data are painted in reverse- Returns:
- the reversal flag
-
format
public final java.lang.String format(double number)
Description copied from interface:GJAxisSupportInterfaceReturns a string for axis labels formatted by an internal formatter- Parameters:
number- the value to format- Returns:
- the String
-
isCategorical
public boolean isCategorical(GJAxisPanel.Orientation or)
Returns true if any plot contained in this graph has categorical labels associated with its data for the specified axis.- Parameters:
or-- Returns:
- the flag
-
getCategoricalLabels
public java.util.ArrayList<Category> getCategoricalLabels(GJAxisPanel.Orientation o)
Description copied from interface:GJAxisSupportInterfaceReturns the categorical data on the specified axis- Parameters:
o- a GJAxisPanel.Orientation value- Returns:
- an ArrayList
-
setLeftAxisPainted
public final void setLeftAxisPainted(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the left axis- Parameters:
flag- the setting to use
-
setRightAxisPainted
public final void setRightAxisPainted(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the right axis- Parameters:
flag- the setting to use
-
setBottomAxisPainted
public final void setBottomAxisPainted(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the bottom axis- Parameters:
flag- the setting to use
-
setTopAxisPainted
public final void setTopAxisPainted(boolean flag)
Description copied from interface:GJAxisSupportInterfaceSets the flag for painting the top axis- Parameters:
flag- the setting to use
-
getSelectedPlots
public final java.util.ArrayList<GJPlotInterface> getSelectedPlots()
Description copied from interface:GJGraphInterfaceReturns a list of plot that are currently selected (e.g. by mouse click).- Returns:
- a
ArrayList<GJPlotInterface>
-
setSelectedPlots
public final void setSelectedPlots(java.util.ArrayList<GJPlotInterface> arr)
Description copied from interface:GJGraphInterfaceProgrammatically selects plots.- Parameters:
arr- aArrayList<GJPlotInterface>
-
setEditor
public final void setEditor(GJEditorInterface Editor)
Description copied from interface:GJGraphInterfaceSets the editor to be activated when this graph is double-clicked.- Parameters:
Editor- an object implementing theGJEditorInterface.
-
fetchEditor
public final GJEditorInterface fetchEditor()
Description copied from interface:GJGraphInterfaceReturns the editor.- Returns:
- a
GJEditorInterface.
-
getMouseHandler
public final java.awt.event.MouseAdapter getMouseHandler()
Description copied from interface:GJGraphInterfaceReturns a MouseAdapter for this component. The methods of the handler can then be called by the mouse listeners of components that are higher in the Swing hierarchy. This is used in Waterloo e.g. by theGJAddedComponentMouseHandlerto support rotated and zoomed graphs. Instead of adding mouse listeners directly to graphs, they are located by reflection and the methods called after on the target graph after accounting for any rotation/zoom of the graphics output.- Returns:
- the MouseAdapter
-
getAxisMouseHandler
public final java.awt.event.MouseAdapter getAxisMouseHandler()
Description copied from interface:GJAxisSupportInterfaceReturns the mouse handler for this axis- Returns:
- a MouseAdapter
-
getMouseWheelHandler
public final java.awt.event.MouseWheelListener getMouseWheelHandler()
-
isTightAxes
public final boolean isTightAxes()
- Returns:
- the tightAxes
-
setTightAxes
public final void setTightAxes(boolean tightAxes)
- Parameters:
tightAxes- the tightAxes to set
-
getAxesPadding
public final double getAxesPadding()
- Returns:
- the axesPadding
-
setAxesPadding
public final void setAxesPadding(double axesPadding)
- Parameters:
axesPadding- the axesPadding to set
-
isTextAsInverse
public final boolean isTextAsInverse()
Description copied from interface:GJGraphInterfaceReturns true if the data shown in themousePositionTextFieldare inverse transformed.- Returns:
- the mouseTextAsInverse
-
setTextAsInverse
public final void setTextAsInverse(boolean flag)
Sets the textAsInverse flag. When set true, mouse position values shown in the mousePositionTextField will be inverse transformed.- Parameters:
flag-
-
getMainFormatter
public final java.text.NumberFormat getMainFormatter()
- Returns:
- the mainFormatter
-
setMainFormatter
public final void setMainFormatter(java.text.NumberFormat mainFormatter)
- Parameters:
mainFormatter- the mainFormatter to set
-
isMouseTextAsInverse
public final boolean isMouseTextAsInverse()
- Returns:
- the mouseTextAsInverse
-
setMouseTextAsInverse
public final void setMouseTextAsInverse(boolean mouseTextAsInverse)
- Parameters:
mouseTextAsInverse- the mouseTextAsInverse to set
-
getSecondFormatter
public final java.text.NumberFormat getSecondFormatter()
- Returns:
- the secondFormatter
-
setSecondFormatter
public final void setSecondFormatter(java.text.NumberFormat secondFormatter)
- Parameters:
secondFormatter- the secondFormatter to set
-
getMousePositionTextFormat
public final java.lang.String getMousePositionTextFormat()
- Returns:
- the mousePositionTextFormat
-
setMousePositionTextFormat
public final void setMousePositionTextFormat(java.lang.String mousePositionTextFormat)
- Parameters:
mousePositionTextFormat- the mousePositionTextFormat to set
-
getDragStart
public final java.awt.geom.Point2D getDragStart()
- Returns:
- the dragStart
-
setDragStart
public final void setDragStart(java.awt.geom.Point2D dragStart)
- Parameters:
dragStart- the dragStart to set
-
isDragX
public final boolean isDragX()
- Returns:
- the dragX
-
setDragX
public final void setDragX(boolean dragX)
- Parameters:
dragX- the dragX to set
-
isDragY
public final boolean isDragY()
- Returns:
- the dragY
-
setDragY
public final void setDragY(boolean dragY)
- Parameters:
dragY- the dragY to set
-
getCurrentMousePosition
public final java.awt.geom.Point2D getCurrentMousePosition()
- Returns:
- the currentMousePosition
-
isPolar
public boolean isPolar()
- Returns:
- the polar
-
setPolar
public void setPolar(boolean polar)
- Parameters:
polar- the polar to set
-
getAxisStrokeWeight
public float getAxisStrokeWeight()
Description copied from interface:GJAxisSupportInterfaceReturns the stroke thickness for axes- Returns:
- thickness in pixels
-
setAxisStrokeWeight
public void setAxisStrokeWeight(float axisStrokeWeight)
Description copied from interface:GJAxisSupportInterfaceSets the width of lines for the axes- Parameters:
axisStrokeWeight- the stroke thickness in pixels
-
getMinorGridStrokeWeight
public float getMinorGridStrokeWeight()
Description copied from interface:GJAxisSupportInterfaceReturns the stroke thickness for minor grids- Returns:
- thickness in pixels
-
setMinorGridStrokeWeight
public void setMinorGridStrokeWeight(float minorGridStrokeWeight)
Description copied from interface:GJAxisSupportInterfaceSets the stroke thickness for minor grids- Parameters:
minorGridStrokeWeight- the thickness in pixels
-
getMajorGridStrokeWeight
public float getMajorGridStrokeWeight()
Description copied from interface:GJAxisSupportInterfaceReturns the stroke thickness for major grids- Returns:
- thickness in pixels
-
setMajorGridStrokeWeight
public void setMajorGridStrokeWeight(float majorGridStrokeWeight)
Description copied from interface:GJAxisSupportInterfaceSets the stroke thickness for major grids- Parameters:
majorGridStrokeWeight- the thickness in pixels
-
getGridInterface
public GJGridInterface getGridInterface()
- Returns:
- the gridInterface
-
setGridInterface
public void setGridInterface(GJGridInterface gridInterface)
- Parameters:
gridInterface- the gridInterface to set
-
getCurrentROI
public java.awt.geom.Rectangle2D.Double getCurrentROI()
- Returns:
- a copy of the currentROI
-
setCurrentROI
public void setCurrentROI(java.awt.geom.Rectangle2D.Double currentROI)
- Parameters:
currentROI- the currentROI to set
-
getAvailableROI
public java.util.ArrayList<java.awt.geom.Rectangle2D> getAvailableROI()
- Returns:
- the availableROI
-
setAvailableROI
public void setAvailableROI(java.util.ArrayList<java.awt.geom.Rectangle2D> availableROI)
- Parameters:
availableROI- the availableROI to set
-
clearSelectedRegions
public void clearSelectedRegions()
-
getMouseDown
public java.awt.geom.Point2D getMouseDown()
- Returns:
- the mouseDown
-
setMouseDown
public void setMouseDown(java.awt.geom.Point2D mouseDown)
- Parameters:
mouseDown- the mouseDown to set
-
getContextMenu
public javax.swing.JPopupMenu getContextMenu()
- Returns:
- the contentMenu
-
linkAxes
public void linkAxes(GJAbstractGraph gr)
Links both the x- and y-axes of this graph to the specified graph- Parameters:
gr-
-
linkAxesXX
public void linkAxesXX(GJAbstractGraph gr)
Links the x-axis of this graph to that of the specified graph.- Parameters:
gr- the graph to link the axis of.
-
linkAxesYY
public void linkAxesYY(GJAbstractGraph gr)
Links the y-axis of this graph to that of the specified graph.- Parameters:
gr- the graph to link the axis of.
-
linkAxesXY
public void linkAxesXY(GJAbstractGraph gr)
Links the x-axis of this graph to the y-axis of the specified graph.- Parameters:
gr- the graph to link the axis of.
-
linkAxesYX
public void linkAxesYX(GJAbstractGraph gr)
Links the y-axis of this graph to the x-axis of the specified graph.- Parameters:
gr- the graph to link the axis of.
-
openLinks
public void openLinks()
Makes any linked graphs referenced by this graph visible - housing them in a standard Waterloo swing hierarchy if required.
-
getKeyListener
public final java.awt.event.KeyListener getKeyListener()
-
addLink
public final void addLink(java.lang.Object o)
Description copied from interface:GJLinkableInterfaceAdds an Object to the Links map
-
removeLink
public final void removeLink(java.lang.Object o)
Description copied from interface:GJLinkableInterfaceRemoves an Object from the Links map
-
clearLinks
public final void clearLinks()
-
getLinks
public final java.util.ArrayList<java.lang.Object> getLinks()
Description copied from interface:GJLinkableInterfaceReturns the list of linked Objects- Returns:
- the ArrayList of linked Objects
-
setLinks
public final void setLinks(java.util.ArrayList<java.lang.Object> links)
Description copied from interface:GJLinkableInterfaceSets the list of linked objects- Parameters:
links- ArrayList
-
hasListeners
public final boolean hasListeners(java.lang.String propertyName)
Description copied from interface:GJObservableInterfaceReturns true if this instance has installed listeners. See java.beans.PropertyChangeSupport- Returns:
- the flag
-
hasSelfListener
public boolean hasSelfListener()
Description copied from interface:GJObservableInterfaceReturns true if the implementing instance is a listener.- Returns:
- true/false
-
saveAsXML
public final void saveAsXML(java.lang.String fileName)
Description copied from interface:GJGraphInterfaceConvenience method to save a graph to a "kclf" file.- Parameters:
fileName- String description of the file.
-
firePropertyChange
public void firePropertyChange(java.beans.PropertyChangeEvent pce)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
-
-
DMelt 3.0 © DataMelt by jWork.ORG