Purple Code

com.purpletech.graph
Class Graph

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--com.purpletech.graph.Graph
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
TickGraph

public class Graph
extends java.awt.Panel

Graph.java Created: Tue Sep 29 12:12:59 1998

Version:
$Id: Graph.java,v 1.2 2001/10/30 12:20:51 alex Exp $
Author:
Alex
See Also:
Serialized Form

Field Summary
 java.awt.Color colorContents
           
 java.awt.Color colorXAxis
           
 java.awt.Color colorXLabels
           
 java.awt.Color colorXRules
           
 java.awt.Color colorYAxis
           
 java.awt.Color colorYLabels
           
 java.awt.Color colorYRules
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected Graph()
           
  Graph(GraphModel model)
           
  Graph(GraphModel model, java.awt.Insets insets)
           
 
Method Summary
 void addRenderer(GraphRenderer r)
           
protected  void calcMargins()
           
 void drawDot(java.awt.Graphics g, int x, int y, int diameter)
          parameters in graph units, not pixels
 void drawLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
          parameters in graph units, not pixels
 GraphModel getModel()
           
 GraphAxis getXAxis()
           
 GraphAxis getYAxis()
           
 void paint(java.awt.Graphics g)
           
protected  void paintAfter(java.awt.Graphics g)
           
protected  void paintAxes(java.awt.Graphics g)
           
protected  void paintBackground(java.awt.Graphics g)
           
protected  void paintBefore(java.awt.Graphics g)
           
protected  void paintContents(java.awt.Graphics g)
           
protected  void paintLegend(java.awt.Graphics g)
           
 void reshape(int x, int y, int width, int height)
           
 void setMargins(java.awt.Insets insets)
           
 void setMargins(int top, int left, int bottom, int right)
           
 void setModel(GraphModel model)
           
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

colorXAxis

public java.awt.Color colorXAxis

colorXRules

public java.awt.Color colorXRules

colorXLabels

public java.awt.Color colorXLabels

colorYAxis

public java.awt.Color colorYAxis

colorYRules

public java.awt.Color colorYRules

colorYLabels

public java.awt.Color colorYLabels

colorContents

public java.awt.Color colorContents
Constructor Detail

Graph

protected Graph()

Graph

public Graph(GraphModel model)

Graph

public Graph(GraphModel model,
             java.awt.Insets insets)
Method Detail

setModel

public void setModel(GraphModel model)

getModel

public GraphModel getModel()

getXAxis

public GraphAxis getXAxis()

getYAxis

public GraphAxis getYAxis()

setMargins

public void setMargins(java.awt.Insets insets)

setMargins

public void setMargins(int top,
                       int left,
                       int bottom,
                       int right)

addRenderer

public void addRenderer(GraphRenderer r)

calcMargins

protected void calcMargins()

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

paintBefore

protected void paintBefore(java.awt.Graphics g)

paintBackground

protected void paintBackground(java.awt.Graphics g)

paintAxes

protected void paintAxes(java.awt.Graphics g)

paintContents

protected void paintContents(java.awt.Graphics g)

paintLegend

protected void paintLegend(java.awt.Graphics g)

paintAfter

protected void paintAfter(java.awt.Graphics g)

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Overrides:
reshape in class java.awt.Component

drawLine

public void drawLine(java.awt.Graphics g,
                     int x1,
                     int y1,
                     int x2,
                     int y2)
parameters in graph units, not pixels


drawDot

public void drawDot(java.awt.Graphics g,
                    int x,
                    int y,
                    int diameter)
parameters in graph units, not pixels


Documentation generated March 5 2003