org.omegahat.Graphics.Primitives
Class GraphicalElement
java.lang.Object
|
+--org.omegahat.Graphics.Primitives.GraphicalObject
|
+--org.omegahat.Graphics.Primitives.RGO
|
+--org.omegahat.Graphics.Primitives.GraphicalElement
- All Implemented Interfaces:
- GraphicalComponentInt
- Direct Known Subclasses:
- FemaleSymbol, MaleSymbol
- public class GraphicalElement
- extends RGO
Graphical objects that can contain other graphical objects.
This class adds to the rectangular graphical
object several concepts to help in the construction of general
objects:
- the addGraphicalObject method builds up this object from simpler objects;
- the X and Y
Scale properties specify the
co-ordinate scales for native units for this object.
| Fields inherited from class org.omegahat.Graphics.Primitives.RGO |
region |
| Methods inherited from class org.omegahat.Graphics.Primitives.RGO |
center, centre, createRegionDescription, createRegionDescription, getRegion, height, height, setHJust, setRegion, setVJust, width, width, x, x, y, y |
| Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject |
cacheSize, draw, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parent, parents, setActive, setParameters, setParents, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
children
protected java.util.Vector children
parent
protected GraphicalObject parent
allocator
protected RegionAllocator allocator
scaleX
protected Scale scaleX
scaleY
protected Scale scaleY
origin
protected int origin
GraphicalElement
public GraphicalElement()
GraphicalElement
public GraphicalElement(double x,
double y,
double width,
double height,
int unit)
GraphicalElement
public GraphicalElement(UDouble x,
UDouble y,
UDouble width,
UDouble height)
XScale
public Scale XScale()
YScale
public Scale YScale()
setXScale
public void setXScale(Scale s)
setYScale
public void setYScale(Scale s)
setOrigin
public void setOrigin(int o)
setRegionAllocator
public void setRegionAllocator(RegionAllocator ra)
draw
public void draw(RectRegion rr,
Scale sx,
Scale sy,
int o,
double widthCM,
double heightCM,
int fontSize,
OutputDevice od)
addGraphicalObject
public void addGraphicalObject(GraphicalObject go)
addGraphicalObject
public void addGraphicalObject(GraphicalObject go,
int inRegion)
parent
public GraphicalObject parent()
- Description copied from class:
GraphicalObject
- Retrieve the (default) parent of this
component.
- Overrides:
parent in class GraphicalObject
parent
public GraphicalObject parent(GraphicalObject o)