public class MoveableItem
extends vialab.SMT.Zone
SimpleMarshaller
class.ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
Constructor and Description |
---|
MoveableItem(int x,
int y,
int width,
int height)
Default constructor.
|
MoveableItem(MoveableItem original)
Constructor that builds a copy of another MoveableItem object.
|
Modifier and Type | Method and Description |
---|---|
void |
addToScreen()
Add the item to the screen.
|
void |
deselect()
Mark the item as not selected.
|
void |
doInit()
Override this function in a subclass to perform an initialisation step.
|
int |
getDrawerId() |
java.lang.String |
getImageFilename() |
boolean |
getIsDragged() |
int |
getPrimaryColour() |
int |
getSecondaryColour() |
boolean |
isSelected() |
void |
select()
Mark the item as selected (it will be drawn with a highlight).
|
void |
setColourScheme(int primary,
int secondary)
Set the colour scheme of the item.
|
void |
setDrawer(int drawerId,
boolean isInDrawer)
Set the item's parent drawer.
|
void |
setImage(java.lang.String filename)
Set the image of the item to the specified file.
|
add, assign, assign, beginTouch, clearZones, clone, clone, clone, contains, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, dragWithinParent, drawRntCircle, endTouch, fromZoneVector, getActiveTouch, getCentre, getChild, getChildCount, getChildren, getGlobalMatrix, getHeight, getIds, getName, getNumTouches, getOrigin, getParent, getRntRadius, getTouchCollection, getTouches, getTouchMap, getWidth, getX, getY, hSwipe, hSwipe, isActive, isAssigned, isAssigned, isChildActive, isDirect, keyPressed, keyReleased, keyTyped, pinch, pinch, putChildOnTop, remove, resetMatrix, rnt, rnt, rnt, rnt, rotate, rotate, rotateAbout, rotateAbout, rotateAboutCentre, rs, rst, rst, rst, rst, rst, rst, setBodyFromMatrix, setData, setDirect, setLocation, setMatrixFromBody, setName, setRntRadius, setSize, swipeDown, swipeLeft, swipeRight, swipeUp, toss, toZoneVector, unassign, unassign, unassignAll, vSwipe, vSwipe
alpha, ambient, ambient, ambient, ambientLight, ambientLight, applyMatrix, applyMatrix, applyMatrix, applyMatrix, applyMatrix, arc, background, background, background, background, background, background, background, beginCamera, beginRaw, beginShape, beginShape, bezier, bezier, bezierDetail, bezierPoint, bezierTangent, bezierVertex, bezierVertex, blend, blend, blue, box, box, brightness, camera, camera, canDraw, color, color, color, color, color, color, color, color, color, colorMode, colorMode, colorMode, colorMode, copy, copy, curve, curve, curveDetail, curvePoint, curveTangent, curveTightness, curveVertex, curveVertex, directionalLight, displayable, dispose, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endRaw, endShape, endShape, fill, fill, fill, fill, fill, fill, filter, filter, flush, frustum, get, get, get, getCache, getMatrix, getMatrix, getMatrix, getStyle, getStyle, green, hint, hue, image, image, image, imageMode, init, is2D, is3D, isModified, lerpColor, lightFalloff, lights, lightSpecular, line, line, loadPixels, mask, mask, modelX, modelY, modelZ, noFill, noLights, normal, noSmooth, noStroke, noTint, ortho, ortho, perspective, perspective, point, point, pointLight, popMatrix, popStyle, printCamera, printMatrix, printProjection, pushMatrix, pushStyle, quad, rect, rect, rect, rectMode, red, removeCache, resize, rotate, rotate, rotateX, rotateY, rotateZ, saturation, save, scale, scale, scale, screenX, screenX, screenY, screenY, screenZ, set, set, setCache, setMatrix, setMatrix, setMatrix, setModified, setModified, setParent, setPath, setPrimary, shape, shape, shape, shapeMode, shininess, smooth, specular, specular, specular, sphere, sphereDetail, sphereDetail, spotLight, stroke, stroke, stroke, stroke, stroke, stroke, strokeCap, strokeJoin, strokeWeight, style, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textAscent, textDescent, textFont, textFont, textLeading, textMode, textSize, texture, textureMode, textWidth, textWidth, textWidth, tint, tint, tint, tint, tint, tint, translate, translate, triangle, updatePixels, updatePixels, vertex, vertex, vertex, vertex, vertex
public MoveableItem(int x, int y, int width, int height)
x
- x-coordinate of the top right corner of the itemy
- y-coordinate of the top right corner of the itemwidth
- width of the itemheight
- height of the itempublic MoveableItem(MoveableItem original)
SimpleMarshaller
class.original
- the original MoveableItem object.public void doInit()
public void setDrawer(int drawerId, boolean isInDrawer)
drawerId
- must be one of the following: Application.TOP_DRAWER
,
Application.LEFT_DRAWER
or
Application.RIGHT_DRAWER
; the item will be added to
the appropriate drawer, if it exists in the GUI.isInDrawer
- set to true if you would like to put the item into the
drawer and to false if the item will be added directly
to the screen.public void addToScreen()
public void select()
deselect()
public void deselect()
select()
public boolean isSelected()
select()
,
deselect()
public void setColourScheme(int primary, int secondary)
primary
- primary coloursecondary
- secondary colourpublic int getPrimaryColour()
public int getSecondaryColour()
public void setImage(java.lang.String filename)
filename
- a valid path to an image filepublic java.lang.String getImageFilename()
public int getDrawerId()
Application.TOP_DRAWER
, Application.LEFT_DRAWER
or Application.RIGHT_DRAWER
public boolean getIsDragged()