|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
protoj.drawing.GraphicObject
protoj.drawing.PageObject
public class PageObject
Class PageObject is the GraphicObject extension which holds a rectangle shape.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected double |
angle
The rotation angle |
protected CanvasPage |
canvasPage
A local reference to the canvas Page object. |
protected int |
gridx
The size of a page block |
protected int |
gridy
The size of a page block |
protected int |
height
The image height |
protected java.awt.Image |
image
An instance of the image class |
protected java.awt.Point |
location
The location of the upper-left hand corner of the box. |
protected java.lang.String |
name
The path to the image file. |
protected int |
scale
the size of the zoom of the page |
protected int |
width
The image width |
Fields inherited from class protoj.drawing.GraphicObject |
---|
aBrush, arrowsOn, backgroundColor, color, controlPoints, fillPattern, foregroundColor, graphic, graphicType, paint, savedColor, savedFillPattern, savedStroke, saveTransform, shape, stroke |
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 | |
---|---|
PageObject(int width,
int height,
int x,
int y,
java.awt.Color c,
java.awt.Color bgc,
java.util.Vector p,
java.util.Vector cPoints,
java.awt.BasicStroke bs,
int pattern,
int brush)
Construct this with the given Shape, Color, FillStyle, and ControlPoints objects. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a derived copy of this.object returns - A copy of this. |
void |
draw(java.awt.Graphics2D g2D,
float zoom)
Draws this Page object to the screen. |
int |
getHeight()
Returns the size of the page grid height |
int |
getMaxX()
Returns the int X value of the right side of the Rectangle which bounds this.shape. |
int |
getMaxY()
Returns the int Y value of the bottom side of the Rectangle which bounds this.shape. |
int |
getMinX()
Returns the int X value of the left side of the Rectangle which bounds this.shape. |
int |
getMinY()
Returns the int Y value of the top side of the Rectangle which bounds this.shape. |
java.util.Vector |
getSaveBundle()
Returns a Vector with all the necessary save information. |
int |
getWidth()
returns the size of the page grid width |
void |
rotate(double theta,
double anchorX,
double anchorY)
Rotates this.location around point (anchorX, anchorY) by theta radians. |
void |
scale(int chgx,
int chgy)
Scales the width and height of this.shape |
void |
setControlPoints()
Sets this.controlPoints based on the current PathIterator of this.shape. |
void |
setGridSize(int x,
int y)
Sets the size of the pages |
void |
setHeight(int y)
Sets the size of the page grid height |
void |
setMaxX(int newMaxX)
Sets the int newMaxX value as the right side of the Rectangle which bounds this.shape. |
void |
setMaxY(int newMaxY)
Sets the int newMaxY value as the bottom side of the Rectangle which bounds this.shape. |
void |
setMinX(int newMinX)
Sets the int newMinX value as the left side of the Rectangle which bounds this.shape. |
void |
setMinY(int newMinY)
Sets the int newMinY value as the top side of the Rectangle which bounds this.shape. |
void |
setShape()
Sets this.shape based on the points currently in this.controlPoints. |
void |
setWidth(int x)
Sets the size of the page grid width |
void |
translate(float deltaX,
float deltaY)
Translates the position of this.shape by the given deltaX and deltaY values. |
void |
translateControlPoint(int a,
int b,
int c)
translateControlPoint(int, int, int) is disabled for an ImageObject. |
Methods inherited from class java.applet.Applet |
---|
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
---|
addNotify |
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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.awt.Point location
protected java.lang.String name
protected java.awt.Image image
protected int width
protected int height
protected double angle
protected int scale
protected CanvasPage canvasPage
protected int gridx
protected int gridy
Constructor Detail |
---|
public PageObject(int width, int height, int x, int y, java.awt.Color c, java.awt.Color bgc, java.util.Vector p, java.util.Vector cPoints, java.awt.BasicStroke bs, int pattern, int brush)
width
- - The int width to store in this.width.height
- - The int height to store in this.height.x
- - The int x grid block to store in this.gridx.y
- - The int Y grid block to store in this.gridy.c
- - The Color object to store in this.color.bgc
- - The Color object to store in this.backgroundColor.p
- - The Vector to store in this.paint.cPoints
- - Vector object to store in this.controlPoints.bs
- - The BasicStroke object to store in this.stroke.pattern
- - The pattern setting to store in this.patternbrush
- - The brush setting to store in this.brushMethod Detail |
---|
public java.lang.Object clone()
clone
in class GraphicObject
public void setShape()
setShape
in class GraphicObject
public void setControlPoints()
setControlPoints
in class GraphicObject
public void draw(java.awt.Graphics2D g2D, float zoom)
draw
in class GraphicObject
g2D
- - the graphics2d referencezoom
- - the float value of the window zoompublic void setGridSize(int x, int y)
setGridSize
in class GraphicObject
public void setWidth(int x)
setWidth
in class GraphicObject
-
- The width of the pageGridpublic void setHeight(int y)
setHeight
in class GraphicObject
-
- The height of the pageGridpublic int getWidth()
getWidth
in class GraphicObject
public int getHeight()
getHeight
in class GraphicObject
public void translate(float deltaX, float deltaY)
translate
in class GraphicObject
deltaX
- - The int value by which to alter the X position of this.shape.deltaY
- - The int value by which to alter the Y position of this.shape.public java.util.Vector getSaveBundle()
getSaveBundle
in class GraphicObject
public void scale(int chgx, int chgy)
scalex
- - A double value representing the scale widthscaley
- - A double value representing the scale heightpublic void rotate(double theta, double anchorX, double anchorY)
rotate
in class GraphicObject
theta
- - The double value representing an angle in radians.anchorX
- - The double value of the x-coordinate of a point.anchorY
- - The double value of the y-coordinate of a point.public int getMinX()
getMinX
in class GraphicObject
public int getMinY()
getMinY
in class GraphicObject
public int getMaxX()
getMaxX
in class GraphicObject
public int getMaxY()
getMaxY
in class GraphicObject
public void setMinX(int newMinX)
setMinX
in class GraphicObject
newMinX
- - The int value to be set as the left side of the Rectangle
which bounds this.shape.public void setMinY(int newMinY)
setMinY
in class GraphicObject
newMinY
- - The int value to be set as the top side of the Rectangle
which bounds this.shape.public void setMaxX(int newMaxX)
setMaxX
in class GraphicObject
newMaxX
- - The int value to be set as the right side of the Rectangle
which bounds this.shape.public void setMaxY(int newMaxY)
setMaxY
in class GraphicObject
newMaxY
- - The int value to be set as the bottom side of the Rectangle
which bounds this.shape.public void translateControlPoint(int a, int b, int c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |