org.omegahat.Graphics.Primitives
Class RGO

java.lang.Object
  |
  +--org.omegahat.Graphics.Primitives.GraphicalObject
        |
        +--org.omegahat.Graphics.Primitives.RGO
All Implemented Interfaces:
GraphicalComponentInt
Direct Known Subclasses:
GraphicalContainer, GraphicalElement, IconPrimitive, LinePrimitive, OvalPrimitive, PolypointPrimitive, RectPrimitive, TextPrimitive

public abstract class RGO
extends GraphicalObject

An abstract class for Rectangular Graphical Objects (RGO) which provides a symbolic description of the rectanglular region iin which it is located.

Contains the notion of an origin (x,y) and a width and height, each with associated units. Some subclasses (e.g., textPrimitive) currently do not make use of the width and height.


Field Summary
protected  RegionDescriptionInt region
          A (symbolic) description of the location and dimension this object represents on the device, specified explicitly or supplied by a RegionAllocator
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
ACTIVE, fontSize, lastDevice, lastHeightCM, lastRegion, lastWidthCM, parents, status, VISIBLE
 
Constructor Summary
RGO()
           
RGO(double x, double y, double width, double height, int unit)
          create the object, using the same units for all co-ordinates.
RGO(RegionDescriptionInt description)
           
RGO(RGO r)
           
RGO(UDouble x, UDouble y, UDouble width, UDouble height)
          create the object, with all values allowed to have their own units.
 
Method Summary
 void center()
           
 void centre()
           
 RegionDescriptionInt createRegionDescription(double x, double y, double width, double height, int unit)
           
 RegionDescriptionInt createRegionDescription(UDouble x, UDouble y, UDouble width, UDouble height)
           
 RegionDescriptionInt getRegion()
          Accessor for region field
 UDouble height()
           
 UDouble height(UDouble v)
           
 void setHJust(int hj)
          set the horizontal adjustment to one of the justifications in class Justification
 RegionDescriptionInt setRegion(RegionDescriptionInt value)
          Accessor for setting region field
 void setVJust(int vj)
          set the vertical adjustment to one of the justifications in class Justification
 UDouble width()
           
 UDouble width(UDouble v)
           
 UDouble x()
           
 UDouble x(UDouble v)
           
 UDouble y()
           
 UDouble y(UDouble v)
           
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
cacheSize, draw, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parent, 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

region

protected RegionDescriptionInt region
A (symbolic) description of the location and dimension this object represents on the device, specified explicitly or supplied by a RegionAllocator
Constructor Detail

RGO

public RGO()

RGO

public RGO(double x,
           double y,
           double width,
           double height,
           int unit)
create the object, using the same units for all co-ordinates.

RGO

public RGO(UDouble x,
           UDouble y,
           UDouble width,
           UDouble height)
create the object, with all values allowed to have their own units.

RGO

public RGO(RGO r)

RGO

public RGO(RegionDescriptionInt description)
Method Detail

createRegionDescription

public RegionDescriptionInt createRegionDescription(double x,
                                                    double y,
                                                    double width,
                                                    double height,
                                                    int unit)

createRegionDescription

public RegionDescriptionInt createRegionDescription(UDouble x,
                                                    UDouble y,
                                                    UDouble width,
                                                    UDouble height)

setHJust

public void setHJust(int hj)
set the horizontal adjustment to one of the justifications in class Justification

setVJust

public void setVJust(int vj)
set the vertical adjustment to one of the justifications in class Justification

centre

public void centre()

center

public void center()

x

public UDouble x()

x

public UDouble x(UDouble v)

y

public UDouble y()

y

public UDouble y(UDouble v)

height

public UDouble height()

height

public UDouble height(UDouble v)

width

public UDouble width()

width

public UDouble width(UDouble v)

getRegion

public RegionDescriptionInt getRegion()
Accessor for region field

setRegion

public RegionDescriptionInt setRegion(RegionDescriptionInt value)
Accessor for setting region field