com.partnersoft.v3x.io.formats.rover
Class RoverGraphic

java.lang.Object
  extended by com.partnersoft.v3x.io.formats.rover.RoverGraphic
All Implemented Interfaces:
RoverConstants, java.io.Serializable
Direct Known Subclasses:
RoverArc, RoverLine, RoverPoint, RoverPolygon, RoverPolyline

public abstract class RoverGraphic
extends java.lang.Object
implements java.io.Serializable, RoverConstants

A graphic entity in a rover file. Has a style code and datatag. Subclasses should support other properties needed (e.g. coordinates, line endpoints, rotations, etc.).

In general, do not use these for high-speed algorithms; creating new objects is expensive. Instead, reuse them or use direct-access objects such as the RoverReader. Direct access to state is provided; this and subclasses are intended to be used more as structures than as encapsulating objects, and we want to avoid method-call overhead of getters and setters. Nothing tricky is happening that really requires encapsulation anyway; just watch your fingers.

See Also:
Serialized Form

Field Summary
 int dataID
           
 int dataType
           
 int styleCode
           
 
Fields inherited from interface com.partnersoft.v3x.io.formats.rover.RoverConstants
DRAW_JUSTIFIED_TEXT, DRAW_OFFSET_POINT, DRAW_OFFSET_TEXT, DRAW_POINT, DRAW_POLYGON, DRAW_POLYLINE, DRAW_TEXT, EOF, JUSTIFY_BASELINE_CENTER, JUSTIFY_BASELINE_LEFT, JUSTIFY_BASELINE_RIGHT, JUSTIFY_NOTSPECIFIED, OPCODE_TYPE_BOUNDARY, SIZE_DRAW_JUSTIFIED_TEXT_PREAMBLE, SIZE_DRAW_OFFSET_POINT, SIZE_DRAW_OFFSET_TEXT_CONCLUSION, SIZE_DRAW_OFFSET_TEXT_PREAMBLE, SIZE_DRAW_POINT, SIZE_DRAW_POLYLINE_PREAMBLE, SIZE_DRAW_TEXT_PREAMBLE, STYLE_REGION
 
Constructor Summary
RoverGraphic()
           
RoverGraphic(int styleCode, int dataType, int dataID)
           
 
Method Summary
 int getDataID()
           
 int getDataType()
           
 int getStyleCode()
           
abstract  float getX()
           
abstract  float getY()
           
 void setDataID(int newDataID)
           
 void setDataType(int newDataType)
           
 void setStyleCode(int newStyleCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

styleCode

public int styleCode

dataType

public int dataType

dataID

public int dataID
Constructor Detail

RoverGraphic

public RoverGraphic()

RoverGraphic

public RoverGraphic(int styleCode,
                    int dataType,
                    int dataID)
Method Detail

getStyleCode

public int getStyleCode()

setStyleCode

public void setStyleCode(int newStyleCode)

getDataType

public int getDataType()

setDataType

public void setDataType(int newDataType)

getDataID

public int getDataID()

setDataID

public void setDataID(int newDataID)

getX

public abstract float getX()

getY

public abstract float getY()