Orbital library

orbital.awt
Class Plot2D

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by orbital.awt.Plot2D
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, javax.accessibility.Accessible

public class Plot2D
extends java.awt.Canvas
implements java.awt.print.Printable, java.io.Serializable

This class is a View-Bean for a ChartModel, it displays 2-dimensional graphs.

Attributes for Matrix

Attributes for Function Attributes for Function[] resp. vectorial Function are the same as for Function. An instance of Function[] represents a parametric plot, a vectorial Function (one that returns Vectors) is displayed like a parametric plot. For each of those the element 0 specifies the function for the x-value at the times t and the element 1 specifies the function for the y-value at the times t. The time t is then in the specified range of the component with index 0.

Author:
André Platzer
See Also:
ChartModel, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Plot2D()
           
Plot2D(ChartModel model)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
protected  void drawAxis(java.awt.Graphics g)
           
protected  void drawGraph(java.awt.Graphics g, Function f, java.util.Map attribs)
           
protected  void drawGraph(java.awt.Graphics g, Matrix A, java.util.Map attribs)
           
 ChartModel getModel()
           
 java.awt.Dimension getPreferredSize()
           
 boolean isAutoScaling()
           
 boolean isFullScaling()
           
 void paint(java.awt.Graphics gg)
           
 int print(java.awt.Graphics gg, java.awt.print.PageFormat pf, int pi)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void setAutoScaling(boolean fixed_autoScalingOnly)
           
 void setFullScaling(boolean fullScalingMarks)
           
 void setModel(ChartModel model)
           
protected  void setWindow(Arithmetic minxo, Arithmetic minyo, Arithmetic maxxo, Arithmetic maxyo)
           
 void update(java.awt.Graphics g)
           
protected  void window(java.awt.Graphics2D g, double minx, double miny, double maxx, double maxy)
           
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plot2D

public Plot2D(ChartModel model)

Plot2D

public Plot2D()
Method Detail

getModel

public ChartModel getModel()

setModel

public void setModel(ChartModel model)

isAutoScaling

public boolean isAutoScaling()

setAutoScaling

public void setAutoScaling(boolean fixed_autoScalingOnly)

isFullScaling

public boolean isFullScaling()

setFullScaling

public void setFullScaling(boolean fullScalingMarks)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Overrides:
addPropertyChangeListener in class java.awt.Component

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Overrides:
removePropertyChangeListener in class java.awt.Component

print

public int print(java.awt.Graphics gg,
                 java.awt.print.PageFormat pf,
                 int pi)
          throws java.awt.print.PrinterException
Specified by:
print in interface java.awt.print.Printable
Throws:
java.awt.print.PrinterException

paint

public void paint(java.awt.Graphics gg)
Overrides:
paint in class java.awt.Canvas

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Canvas

window

protected void window(java.awt.Graphics2D g,
                      double minx,
                      double miny,
                      double maxx,
                      double maxy)

setWindow

protected void setWindow(Arithmetic minxo,
                         Arithmetic minyo,
                         Arithmetic maxxo,
                         Arithmetic maxyo)

drawAxis

protected void drawAxis(java.awt.Graphics g)

drawGraph

protected void drawGraph(java.awt.Graphics g,
                         Matrix A,
                         java.util.Map attribs)

drawGraph

protected void drawGraph(java.awt.Graphics g,
                         Function f,
                         java.util.Map attribs)

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.