Interface GraphicsObject
access this type via: ui.GraphicsObject (provides, requires or uses)
This is an API that represents a generic graphical object. All other graphical object types should inherit from this one.
Transfer fields
int xPosition
int yPosition
Events
repaint()
Functions
void postRepaint()
void paint(Canvas c)
void setPosition(int x, int y)
Point getPosition()
WH getPreferredSize()
Transfer fields
xPosition
yPosition
Events
repaint An event of this type can be emitted to request the graphical region hosting this object to call the paint function of the object.
void postRepaint()
Request a graphics object to redraw itself.
void paint(Canvas c)
This function is called by the rendering system when it is time to draw this object.
void setPosition(int x, int y)
Set the location of this object, in pixels, from the top-left of the containing entity.
Point getPosition()
Get the location of this object, in pixels, from the top-left of the containing entity.
WH getPreferredSize()
This function is called when another graphics entity would like to know the preferred size of this object, for example to help with layout calculations.