T
- The AMAS the drawableui is linked to@Deprecated public abstract class DrawableUI<T extends Amas<? extends Environment>> extends java.lang.Object implements Schedulable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
params
Deprecated.
Parameters to initialize the drawable UI
|
DEFAULT_SLEEP
Constructor and Description |
---|
DrawableUI(Scheduling scheduling,
T amas,
java.lang.Object... params)
Deprecated.
Should be replaced by VUI
|
Modifier and Type | Method and Description |
---|---|
void |
cycle()
Deprecated.
A cycle of the schedulable system
|
T |
getAmas()
Deprecated.
Getter for amas
|
int |
getHeight()
Deprecated.
Getter for the height
|
Scheduler |
getScheduler()
Deprecated.
This method gives access to the scheduler of the DrawableUI
|
int |
getWidth()
Deprecated.
Getter for the width
|
protected void |
onClick(int x,
int y)
Deprecated.
This method is called when the mouse is clicked on the canvas
|
protected abstract void |
onDraw(java.awt.Graphics2D graphics2D)
Deprecated.
This method is called when the canvas must be drawn again
|
protected void |
onInitialConfiguration()
Deprecated.
This method is called at the very beginning of the DrawableUI creation.
|
protected void |
onMouseDragged(int x,
int y)
Deprecated.
This method is called when the mouse is dragged on the canvas
|
void |
onSchedulingStarts()
Deprecated.
This method is called when the scheduler starts
|
void |
onSchedulingStops()
Deprecated.
This method is called when the scheduler stops (by stopCondition or explicit
stop)
|
protected void |
setSize(int width,
int height)
Deprecated.
Set the size of the drawing area
|
void |
start()
Deprecated.
Helper method to launch the scheduler
|
boolean |
stopCondition()
Deprecated.
This method allows the system to stop the scheduler on certain conditions
|
protected java.lang.Object[] params
@Deprecated public DrawableUI(Scheduling scheduling, T amas, java.lang.Object... params)
scheduling
- the scheduling modeamas
- The amas linked to the drawable UIparams
- the parameters that should be passed to the drawable UIpublic int getWidth()
public int getHeight()
protected void onInitialConfiguration()
protected void setSize(int width, int height)
width
- The width in pixelsheight
- The height in pixelspublic final void cycle()
Schedulable
cycle
in interface Schedulable
protected abstract void onDraw(java.awt.Graphics2D graphics2D)
graphics2D
- Object used for drawing on the canvasprotected void onClick(int x, int y)
x
- X position of the mousey
- Y position of the mouseprotected void onMouseDragged(int x, int y)
x
- X position of the mousey
- Y position of the mousepublic Scheduler getScheduler()
public void start()
public boolean stopCondition()
stopCondition
in interface Schedulable
public T getAmas()
public void onSchedulingStarts()
Schedulable
onSchedulingStarts
in interface Schedulable
public void onSchedulingStops()
Schedulable
onSchedulingStops
in interface Schedulable