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:


Field Summary
protected  RegionAllocator allocator
           
protected  java.util.Vector children
           
protected  int origin
           
protected  GraphicalObject parent
           
protected  Scale scaleX
           
protected  Scale scaleY
           
 
Fields inherited from class org.omegahat.Graphics.Primitives.RGO
region
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
ACTIVE, fontSize, lastDevice, lastHeightCM, lastRegion, lastWidthCM, parents, status, VISIBLE
 
Constructor Summary
GraphicalElement()
           
GraphicalElement(double x, double y, double width, double height, int unit)
           
GraphicalElement(UDouble x, UDouble y, UDouble width, UDouble height)
           
 
Method Summary
 void addGraphicalObject(GraphicalObject go)
           
 void addGraphicalObject(GraphicalObject go, int inRegion)
           
 void draw(RectRegion rr, Scale sx, Scale sy, int o, double widthCM, double heightCM, int fontSize, OutputDevice od)
           
 GraphicalObject parent()
          Retrieve the (default) parent of this component.
 GraphicalObject parent(GraphicalObject o)
           
 void setOrigin(int o)
           
 void setRegionAllocator(RegionAllocator ra)
           
 void setXScale(Scale s)
           
 void setYScale(Scale s)
           
 Scale XScale()
           
 Scale YScale()
           
 
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
 

Field Detail

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
Constructor Detail

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)
Method Detail

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)