public class

Canvas

extends Object
java.lang.Object
   ↳ casmi.graphics.canvas.Canvas
Known Direct Subclasses

Class Overview

Graphics Object

Summary

Nested Classes
enum Canvas.ObjectMatrixMode  
Fields
protected Camera camera
protected List<Element> elementList
protected List<Light> lights
protected DoubleBuffer matrix
protected Canvas.ObjectMatrixMode mode
protected MouseStatus mouseStatus
protected Projection projection
Public Constructors
Canvas()
Public Methods
void add(Element e)
synchronized void add(int index, Element r)
synchronized void addAll(Collection<? extends Element> c)
synchronized void addLight(int index, Light r)
synchronized void addLight(Light l)
synchronized void applyMatrix(double[] matrix)
synchronized void applyMatrix(DoubleBuffer matrix)
synchronized void clear()
synchronized void clearLight()
Element get(int index)
Camera getCamera(int index)
Projection getProjection(int index)
int getSize()
double getX()
double getY()
double getZ()
synchronized void loadMatrix(DoubleBuffer matrix)
synchronized void loadMatrix(double[] matrix)
synchronized void remove(Element e)
synchronized void removeLight(Light l)
synchronized void setCamera(Camera c)
void setMouseStatus(MouseStatus status)
void setPosition(double x, double y, double z)
Sets the position of the Element in 3D.
void setPosition(double x, double y)
Sets the position of the Element in 2D.
synchronized void setProjection(Projection p)
void setX(double x)
void setY(double y)
void setZ(double z)
synchronized int triggerMouseEvent(int selectedIndex, int beginIndex)
Protected Methods
synchronized void renderAll(Graphics g)
synchronized int renderAllForSelection(Graphics g, double mouseX, double mouseY, int beginIndex)
synchronized void resetObjects(Graphics g)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Camera camera

protected List<Element> elementList

protected List<Light> lights

protected DoubleBuffer matrix

protected Canvas.ObjectMatrixMode mode

protected MouseStatus mouseStatus

protected Projection projection

Public Constructors

public Canvas ()

Public Methods

public void add (Element e)

public synchronized void add (int index, Element r)

public synchronized void addAll (Collection<? extends Element> c)

public synchronized void addLight (int index, Light r)

public synchronized void addLight (Light l)

public synchronized void applyMatrix (double[] matrix)

public synchronized void applyMatrix (DoubleBuffer matrix)

public synchronized void clear ()

public synchronized void clearLight ()

public Element get (int index)

public Camera getCamera (int index)

public Projection getProjection (int index)

public int getSize ()

public double getX ()

public double getY ()

public double getZ ()

public synchronized void loadMatrix (DoubleBuffer matrix)

public synchronized void loadMatrix (double[] matrix)

public synchronized void remove (Element e)

public synchronized void removeLight (Light l)

public synchronized void setCamera (Camera c)

public void setMouseStatus (MouseStatus status)

public void setPosition (double x, double y, double z)

Sets the position of the Element in 3D.

Parameters
x x-coordinate
y y-coordinate
z z-coordinate

public void setPosition (double x, double y)

Sets the position of the Element in 2D.

Parameters
x x-coordinate
y y-coordinate

public synchronized void setProjection (Projection p)

public void setX (double x)

public void setY (double y)

public void setZ (double z)

public synchronized int triggerMouseEvent (int selectedIndex, int beginIndex)

Protected Methods

protected synchronized void renderAll (Graphics g)

protected synchronized int renderAllForSelection (Graphics g, double mouseX, double mouseY, int beginIndex)

protected synchronized void resetObjects (Graphics g)