kcl.waterloo.graphics
Class GJGraph
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- 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
public final class GJGraph extends GJAbstractGraph
Concrete class extending theGJAbstractGraphclass. WhileGJGraphinstances can be independent of their containers, they will normally be added to aGJGraphContainerinstance. TheGJGraphclass supports adding of plots, provides objects to transform the data held in those plots as well as coordinating the painting of grids and internal axes. Axes shown outside of the viewable area of the graph are painted by theGraphContainerif it has one. These components are properties of the graph, but are members of the Swing hierarchy of the container.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class kcl.waterloo.graphics.GJAbstractGraph
GJAbstractGraph.GraphCycler
-
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
-
-
Constructor Summary
Constructors Constructor and Description GJGraph()Creates a new graph display.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static GJGraphcreateInstance()GJBasicPanel.LocalTransferablegetTransferable()Returns aTransferablefor this panel for use in CCP/DnD.voidpaint(java.awt.Graphics g)Overridden paint method to take into account the alpha setting.voidpaintComponent(java.awt.Graphics g)Overridden to provide Painter support.voidpaintGrid()-
Methods inherited from class kcl.waterloo.graphics.GJAbstractGraph
add, add, add, add, add, add, add, add, addLink, addListeners, autoScale, clearLinks, clearSelectedRegions, createAxes, fetchEditor, firePropertyChange, format, getAllPlots, getAncestorGraph, getAvailableROI, getAxesBounds, getAxesPadding, getAxisColor, getAxisMouseHandler, getAxisStrokeWeight, getBottomAxisPanel, getCategoricalLabels, getContextMenu, getCurrentLayer, getCurrentLayerIndex, getCurrentMousePosition, getCurrentROI, getDataRange, getDragStart, getGraphContainer, getGridInterface, getKeyListener, getLayer, getLayers, getLeftAxisPanel, getLinks, getMainFormatter, getMajorGridColor, getMajorGridStrokeWeight, getMajorXHint, getMajorYHint, getMinorCountXHint, getMinorCountYHint, getMinorGridColor, getMinorGridStrokeWeight, getMouseDown, getMouseHandler, getMousePositionTextField, getMousePositionTextFormat, getMouseWheelHandler, getPlotAt, getPlots, getRightAxisPanel, getSecondFormatter, getSelectedPlots, getTopAxisPanel, getXLabel, getYLabel, hasListeners, hasSelfListener, indexOf, inverseTransform, isBottomAxisLabelled, isBottomAxisPainted, isCategorical, isDragX, isDragY, isInnerAxisLabelled, isInnerAxisPainted, isLeftAxisLabelled, isLeftAxisPainted, isMajorGridPainted, isMinorGridPainted, isMouseTextAsInverse, isPolar, isRightAxisLabelled, isRightAxisPainted, isTextAsInverse, isTightAxes, isTopAxisLabelled, isTopAxisPainted, isXReversed, isYReversed, linkAxes, linkAxesXX, linkAxesXY, linkAxesYX, linkAxesYY, openLinks, plus, plus, propertyChange, remove, remove, removeAllPlots, removeLink, removeListeners, removePlotAt, resetView, saveAsXML, setAntialiasing, setAvailableROI, setAxesBounds, setAxesBounds, setAxesBoundsAndOrigin, setAxesPadding, setAxisColor, setAxisStrokeWeight, setBackgroundPainted, setBottomAxisLabelled, setBottomAxisPainted, setBottomAxisPanel, setCurrentLayer, setCurrentLayerIndex, setCurrentROI, setDragStart, setDragX, setDragY, setEditor, setGraphContainer, setGraphContainer, setGridInterface, setInnerAxisLabelled, setInnerAxisPainted, setKeyAntialiasing, setLeftAxisLabelled, setLeftAxisPainted, setLeftAxisPanel, setLinks, setMainFormatter, setMajorGridColor, setMajorGridPainted, setMajorGridStrokeWeight, setMajorXHint, setMajorXHint, setMajorYHint, setMajorYHint, setMinorCountXHint, setMinorCountYHint, setMinorGridColor, setMinorGridPainted, setMinorGridStrokeWeight, setMouseDown, setMousePositionTextField, setMousePositionTextFormat, setMouseTextAsInverse, setPlots, setPolar, setReverseX, setReverseY, setRightAxisLabelled, setRightAxisPainted, setRightAxisPanel, setSecondFormatter, setSelectedPlots, setTextAntialiasing, setTextAsInverse, setTightAxes, setTopAxisLabelled, setTopAxisPainted, setTopAxisPanel, setXLabel, setYLabel, updatePlots
-
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, isBackgroundPainted, isOnEDT, print, print, setID
-
Methods inherited from class org.jdesktop.swingx.JXPanel
getAlpha, getBackgroundPainter, getEffectiveAlpha, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, isInheritAlpha, isPaintBorderInsets, 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
-
-
-
-
Constructor Detail
-
GJGraph
public GJGraph()
Creates a new graph display. The following properties are automatically set:
- view: -1.0 to +1.0 on both axis
- origin: At
(0, 0) - grid: Spacing of 0.2 between major lines; minor lines count is 4
-
-
Method Detail
-
createInstance
public static GJGraph createInstance()
-
paint
public void paint(java.awt.Graphics g)
Description copied from class:JXPanelOverridden paint method to take into account the alpha setting.
-
paintComponent
public final void paintComponent(java.awt.Graphics g)
Overridden to provide Painter support. It will call backgroundPainter.paint() if it is not null, else it will call super.paintComponent().- Overrides:
paintComponentin classGJBasicPanel- Parameters:
g-
-
paintGrid
public void paintGrid()
-
getTransferable
public GJBasicPanel.LocalTransferable getTransferable()
Description copied from class:GJBasicPanelReturns aTransferablefor this panel for use in CCP/DnD.- Overrides:
getTransferablein classGJBasicPanel- Returns:
- custom
Transferablesubclass
-
-
DMelt 3.0 © DataMelt by jWork.ORG