Beruflich Dokumente
Kultur Dokumente
Editor()
Creates an Editor object with default title, background, width and height.
Text class
Text(String text, int x,
int y)
Text(Text textObject)
Creates a Text object which is a copy of textObject.
Line class
Line(int x1,int y1, int x2, int y2)
Creates a Line object representing a line with endpoints (x1,y1) and (x2,y2).
Line(Line lineObject)
Creates a Line object which is a copy of lineObject.
Rectangle class
Rectangle(int x, int y , int width , int height)
Creates a Rectangle object representing a rectangle shape given the upper-left corner (x,y), width
and height
Rectangle(Rectangle rectObject)
Creates a Rectangle object which is a copy of rectObject
Oval class
Oval(int x, int y, int width, int height)
Creates an Oval object representing an oval shape given the upper-left corner (x,y), width
and height of its bounding rectangle.
Oval(Oval ovalObject)
Creates a Oval object which is a copy of ovalObject.
Polygon class
Polygon(int numPoints)
Creates a Polygon object representing a closed polygonal shape consisting of n vertices.
An example of a polygon containing 5 vertices
Polygon(Polygon polygonObject)
Creates a Polygon object which is a copy of polygonObject.
Group class
Group()
Creates an Group object representing an empty group of elements.
Group(Group groupObject)
Creates a Group object which is a copy of groupObject.
void add(element)
Adds the given element to the group
void translate(int d_x, int d_y)
Relocates the Group object by d_x units along the X-axis and d_y units along the Y-axis.
(positive value for x/y to the right/downward, negative value for x/y- to the left / upward)