public abstract class Drawable
extends java.lang.Object
VUI system| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Color |
color
The color of the object
|
protected double |
height
The real height
|
protected int |
layer
The order of drawing.
|
protected boolean |
strokeMode
Does only the border must be displayed ?
|
protected VUI |
vui
The VUI on which the object is drawn
|
| Modifier | Constructor and Description |
|---|---|
protected |
Drawable(VUI vui,
double dx,
double dy,
double width,
double height)
Constructor of the obejct
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
_onDraw(java.awt.Graphics2D graphics)
Method that must be overrided to draw
|
double |
bottom()
Get the bottom y coordinate
|
double |
getAngle()
Getter for the angle attribute
|
double |
getHeight()
Get the real height
|
int |
getLayer()
Getter for the layer attribute
|
double |
getRenderedHeight()
Compute the height as it must be displayed on screen.
|
double |
getRenderedWidth()
Compute the width as it must be displayed on screen.
|
double |
getWidth()
Get the real width
|
Drawable |
hide() |
boolean |
isFixed()
Getter for the fixed attribute
|
boolean |
isVisible() |
double |
left()
Get the left x coordinate
|
Drawable |
move(double dx,
double dy) |
void |
onDraw(java.awt.Graphics2D graphics)
Draw the object if visible and if on screen
|
double |
right()
Get the right x coordinate
|
Drawable |
setAngle(double angle2)
Set the new angle
|
Drawable |
setColor(java.awt.Color color) |
Drawable |
setFixed() |
void |
setHeight(double height)
Set the real height of the object
|
Drawable |
setLayer(int layer)
Set the layer and update
|
void |
setPanel(VUI vectorialUI)
Set the associated VUI
|
Drawable |
setStrokeOnly()
Only draw the border of the object
|
Drawable |
setVisible(boolean visible) |
void |
setWidth(double width)
Set the real width of the object
|
Drawable |
show() |
double |
top()
Get the top y coordinate
|
void |
update()
Method called when the VUI must be refreshed
|
protected double height
protected boolean strokeMode
protected java.awt.Color color
protected VUI vui
protected int layer
protected Drawable(VUI vui, double dx, double dy, double width, double height)
vui - the VUI on which the object must be drawndx - the x real positiondy - the y real positionwidth - the real widthheight - the real heightpublic double getRenderedWidth()
public void setWidth(double width)
width - The new widthpublic double getRenderedHeight()
public void setHeight(double height)
height - The new heightpublic double getWidth()
public double getHeight()
public boolean isFixed()
public double getAngle()
public int getLayer()
public Drawable setLayer(int layer)
layer - the new layerpublic Drawable setAngle(double angle2)
angle2 - the new anglepublic void onDraw(java.awt.Graphics2D graphics)
graphics - The graphics object that must be used to drawpublic abstract void _onDraw(java.awt.Graphics2D graphics)
graphics - the Graphics2D objectpublic void update()
public void setPanel(VUI vectorialUI)
vectorialUI - public double top()
public double left()
public double bottom()
public double right()
public Drawable setStrokeOnly()
public Drawable setColor(java.awt.Color color)
color - public Drawable move(double dx, double dy)
dx - dy - public Drawable setFixed()
public Drawable show()
public Drawable hide()
public boolean isVisible()
public Drawable setVisible(boolean visible)
visible -