|
Jazz API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.umd.cs.jazz.ZDrawingSurface
ZDrawingSurface represents the surface on which a camera can project. A surface can be mapped to a Java Component (AWT or Swing), a back buffer or image, or a printer - actually, anything that can generate a Graphics2D - the Java2D render context.
ZNode, Serialized Form| Field Summary | |
static int |
DEFAULT_HALO
|
static int |
DEFAULT_RENDER_QUALITY
|
static int |
RENDER_QUALITY_HIGH
|
static int |
RENDER_QUALITY_LOW
|
static int |
RENDER_QUALITY_MEDIUM
|
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE,
PAGE_EXISTS |
| Constructor Summary | |
ZDrawingSurface()
Constructs a new Surface. |
|
ZDrawingSurface(ZCamera camera,
ZNode cameraNode)
Constructs a new Surface. |
|
ZDrawingSurface(ZCamera camera,
ZNode cameraNode,
javax.swing.JComponent aComponent)
Constructs a new Surface. |
|
| Method Summary | |
java.lang.String |
dump()
Generate a string that represents this object for debugging. |
java.util.ArrayList |
findNodes(ZFindFilter filter)
Return the list of nodes that are accepted by the specified filter in the portion of the scenegraph visible within the camera attached to this surface. |
ZCamera |
getCamera()
Get the camera this surface is associated with. |
ZNode |
getCameraNode()
Get the camera node this surface is associated with. |
int |
getRenderQuality()
Determine the current render quality. |
boolean |
isInteracting()
Determine if the user interacting with the surface |
void |
paint(java.awt.Graphics g)
Paints the camera this surface sees. |
void |
paintImmediately()
Force this surface to immediately paint any regions that are out of date and marked for future repainting. |
ZSceneGraphPath |
pick(int x,
int y)
Returns the path to the first object intersecting the specified rectangle within DEFAULT_HALO pixels as searched in reverse (front-to-back) order, or null if no objects satisfy criteria. |
ZSceneGraphPath |
pick(int x,
int y,
int halo)
Returns the path to the first object intersecting the specified rectangle within halo pixels as searched in reverse (front-to-back) order, or null if no objects satisfy criteria. |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints the surface into the specified Graphics context in the specified format. |
void |
printSurface()
Constructs a new PrinterJob, allows the user to select which printer to print to, and prints the surface. |
void |
repaint()
A utility function to repaint the entire component. |
void |
setCamera(ZCamera cam,
ZNode camNode)
Sets the camera that this surface is rendered with. |
void |
setComponent(javax.swing.JComponent aComponent)
Set the component that this surface is attached to, or null if none. |
void |
setInteracting(boolean v)
Specify if the user is interacting with the surface or not. |
void |
setRenderQuality(int qualityRequested)
Specify that future rendering should occur at the specified quality. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int RENDER_QUALITY_LOW
public static final int RENDER_QUALITY_MEDIUM
public static final int RENDER_QUALITY_HIGH
public static final int DEFAULT_HALO
public static final int DEFAULT_RENDER_QUALITY
| Constructor Detail |
public ZDrawingSurface()
public ZDrawingSurface(ZCamera camera,
ZNode cameraNode)
setComponent(javax.swing.JComponent)node - The part of the scenegraph this camera sees.cameraNode - The node the camera is attached to
public ZDrawingSurface(ZCamera camera,
ZNode cameraNode,
javax.swing.JComponent aComponent)
node - The part of the scenegraph this camera sees.cameraNode - The node the camera is attached toaComponent - The component this surface is connected to| Method Detail |
public void setRenderQuality(int qualityRequested)
qualityRequested - Can be RENDER_QUALITY_LOW,
RENDER_QUALITY_MEDIUM or RENDER_QUALITY_HIGH.public int getRenderQuality()
public void setComponent(javax.swing.JComponent aComponent)
aComponent - The component this surface is attached to, or null if none.
public void setCamera(ZCamera cam,
ZNode camNode)
cam - The new cameracamNode - The camera's nodepublic ZCamera getCamera()
public ZNode getCameraNode()
public boolean isInteracting()
public void setInteracting(boolean v)
v - Value to assign to interacting.public void repaint()
public void paint(java.awt.Graphics g)
Graphics - The graphics to use for rendering.public void paintImmediately()
public ZSceneGraphPath pick(int x,
int y)
x - X-coord of pick point in window coordinates.y - Y-coord of pick point in window coordinates.
public ZSceneGraphPath pick(int x,
int y,
int halo)
x - X-coord of pick point in window coordinates.y - Y-coord of pick point in window coordinates.halo - The amount the point can miss an object and still pick itpublic java.util.ArrayList findNodes(ZFindFilter filter)
filter - The filter that decides whether or not to include individual nodes in the find listZNode.isFindable(),
ZFindFilterpublic void printSurface()
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
graphics - the context into which the page is drawnpageFormat - the size and orientation of the page being drawnpageIndex - the zero based index of the page to be drawnpublic java.lang.String dump()
ZDebug.dump(edu.umd.cs.jazz.ZNode)
|
Jazz API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||