Package | Description |
---|---|
acm.graphics |
This package provides a set of classes that support the creation of simple,
object-oriented graphical displays.
|
acm.program |
This package provides a set of classes that simplify the creation of programs.
|
Modifier and Type | Method and Description |
---|---|
GPoint |
GCompound.getCanvasPoint(double x,
double y)
Converts the location of the specified point in this compound to
the corresponding point in the enclosing canvas.
|
GPoint |
GCompound.getCanvasPoint(GPoint localPoint)
Converts the location of the specified point in this compound to
the corresponding point in the enclosing canvas.
|
GPoint |
GPolygon.getCurrentPoint()
Returns the coordinates of the last vertex added to the polygon, or
null
if the polygon is empty. |
GPoint |
GLine.getEndPoint()
Returns the end point of the line as a
GPoint object. |
GPoint |
GArc.getEndPoint()
Returns the point at which the arc ends.
|
GPoint |
GCompound.getLocalPoint(double x,
double y)
Converts the specified point on the enclosing canvas to the
corresponding point in the space of this compound.
|
GPoint |
GCompound.getLocalPoint(GPoint canvasPoint)
Converts the location of the specified point on the enclosing canvas
to the corresponding point in the space of this compound.
|
GPoint |
GRectangle.getLocation()
Returns a new
GPoint with the location of the rectangle. |
GPoint |
GPoint.getLocation()
Returns a new
GPoint whose coordinates are the same as this one. |
GPoint |
GObject.getLocation()
Returns the location of this object as a
GPoint . |
GPoint |
GLine.getStartPoint()
Returns the coordinates of the initial point in the line.
|
GPoint |
GArc.getStartPoint()
Returns the point at which the arc starts.
|
Modifier and Type | Method and Description |
---|---|
void |
GCanvas.add(java.awt.Component comp,
GPoint pt)
Adds the component to this canvas and sets its location to the specified point.
|
void |
GCanvas.add(GObject gobj,
GPoint pt)
Adds the graphical object to this canvas and sets its location to the specified point.
|
void |
GCompound.add(GObject gobj,
GPoint pt)
Adds the graphical object to this canvas and sets its location to the specified point.
|
void |
GContainer.add(GObject gobj,
GPoint pt)
Adds the graphical object to this canvas and sets its location to the specified point.
|
boolean |
GRectangle.contains(GPoint pt)
Returns
true if the GRectangle contains the specified point. |
boolean |
GObject.contains(GPoint pt)
Checks to see whether a point is inside the object.
|
GPoint |
GCompound.getCanvasPoint(GPoint localPoint)
Converts the location of the specified point in this compound to
the corresponding point in the enclosing canvas.
|
GObject |
GCanvas.getElementAt(GPoint pt)
Returns the topmost graphical object that contains the specified point,
or
null if no such object exists. |
GObject |
GCompound.getElementAt(GPoint pt)
Returns the topmost graphical object that contains the specified point,
or
null if no such object exists. |
GObject |
GContainer.getElementAt(GPoint pt)
Returns the topmost graphical object that contains the specified point,
or
null if no such object exists. |
GPoint |
GCompound.getLocalPoint(GPoint canvasPoint)
Converts the location of the specified point on the enclosing canvas
to the corresponding point in the space of this compound.
|
void |
GRectangle.setBounds(GPoint pt,
GDimension size)
Sets the components of a
GRectangle from the specified location and size. |
void |
GRectangle.setLocation(GPoint pt)
Sets the location of the
GRectangle to the specified point. |
void |
GPoint.setLocation(GPoint p)
Sets the location of the
GPoint to that of an existing one. |
void |
GObject.setLocation(GPoint pt)
Sets the location of this object to the specified point.
|
Constructor and Description |
---|
GPoint(GPoint p)
Constructs a new
GPoint from an existing one. |
GPolygon(GPoint[] points)
Constructs a new polygon from the specified array of
GPoint
objects. |
GRectangle(GPoint pt)
Constructs a new empty
GRectangle at the specified location. |
GRectangle(GPoint pt,
GDimension size)
Constructs a new
GRectangle with the specified location and size. |
Modifier and Type | Method and Description |
---|---|
void |
GraphicsProgram.add(GObject gobj,
GPoint pt)
Adds the graphical object to this canvas and sets its location to the specified point.
|
GObject |
GraphicsProgram.getElementAt(GPoint pt)
Returns the topmost graphical object that contains the specified point,
or
null if no such object exists. |