PJA Toolkit 2.6

com.eteks.tools.awt
Class Curve3DDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.eteks.tools.awt.Curve3DDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Curve3DDisplay
extends java.awt.Canvas

A canvas able to display a 3D surface defined by the equation z = f(x,y). As the algorithm used to sort hidden and visible polygons is very simple (painter algorithm), some surfaces may appear incorrectly.

Since:
Jeks 1.0
Version:
1.0
Author:
Emmanuel Puybaret
See Also:
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int DISPLAY_ALL_MESH
           
static int DISPLAY_MESH
           
static int DISPLAY_WITH_LIGHTING
           
 
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
Curve3DDisplay()
           
 
Method Summary
 void computeCurve(CompiledFunction function, double minimumX, double maximumX, int meshSize)
           
 boolean mouseDown(java.awt.Event event, int x, int y)
           
 boolean mouseDrag(java.awt.Event event, int x, int y)
           
 void paint(java.awt.Graphics gc)
           
 java.awt.Dimension preferredSize()
           
 void reshape(int x, int y, int width, int height)
           
 void setDefaultPosition()
           
 void setDisplayMode(int displayMode)
           
 void update(java.awt.Graphics gc)
           
 
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, 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, getBaseline, getBaselineResizeBehavior, 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, getPreferredSize, 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, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, 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, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, 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
 

Field Detail

DISPLAY_WITH_LIGHTING

public static final int DISPLAY_WITH_LIGHTING
See Also:
Constant Field Values

DISPLAY_MESH

public static final int DISPLAY_MESH
See Also:
Constant Field Values

DISPLAY_ALL_MESH

public static final int DISPLAY_ALL_MESH
See Also:
Constant Field Values
Constructor Detail

Curve3DDisplay

public Curve3DDisplay()
Method Detail

computeCurve

public void computeCurve(CompiledFunction function,
                         double minimumX,
                         double maximumX,
                         int meshSize)

setDisplayMode

public void setDisplayMode(int displayMode)

setDefaultPosition

public void setDefaultPosition()

preferredSize

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

reshape

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

update

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

paint

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

mouseDown

public boolean mouseDown(java.awt.Event event,
                         int x,
                         int y)
Overrides:
mouseDown in class java.awt.Component

mouseDrag

public boolean mouseDrag(java.awt.Event event,
                         int x,
                         int y)
Overrides:
mouseDrag in class java.awt.Component

PJA Toolkit 2.6

© Copyrights 1997-2008 eTeks - All rights reserved