|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jcgm.core.Command
public class Command
Base class for all the CGM commands.
Notes from the Java Language Reference: The integral types are byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and char, whose values are 16-bit unsigned integers representing Unicode characters.
Field Summary | |
---|---|
protected int[] |
args
All the command parameters |
protected int |
currentArg
The current command parameter we're reading |
Constructor Summary | |
---|---|
Command(int ec,
int eid,
int l,
java.io.DataInput in)
The base class for all commands. |
Method Summary | |
---|---|
protected void |
alignOnWord()
Align on a word boundary |
java.lang.Object |
clone()
|
int |
getElementClass()
Returns the element class for this command |
int |
getElementCode()
Returns the element ID for this command |
protected void |
info(java.lang.String message)
|
protected byte |
makeByte()
|
protected char |
makeChar()
|
protected int |
makeColorIndex()
|
protected int |
makeColorIndex(int precision)
|
protected java.awt.Color |
makeDirectColor()
|
protected int |
makeEnum()
|
protected double |
makeFixedPoint()
|
protected java.lang.String |
makeFixedString()
|
protected double |
makeFloat32(int i)
|
protected double |
makeFloatingPoint()
|
protected double |
makeFloatingPoint32()
|
protected int |
makeIndex()
|
protected int |
makeInt()
|
protected int |
makeName()
|
protected java.awt.geom.Point2D.Double |
makePoint()
|
protected double |
makeReal()
|
protected StructuredDataRecord |
makeSDR()
|
protected int |
makeSignedInt16()
|
protected int |
makeSignedInt24()
|
protected int |
makeSignedInt32()
|
protected int |
makeSignedInt8()
|
protected double |
makeSizeSpecification(SpecificationMode specificationMode)
|
protected java.lang.String |
makeString()
|
protected int |
makeUInt(int precision)
|
protected double |
makeVc()
|
protected double |
makeVdc()
|
void |
paint(CGMDisplay d)
|
protected java.lang.String |
printShape(java.awt.Shape s)
Returns a descriptive string of the given shape |
static Command |
read(java.io.DataInput in)
Reads one command from the given input stream. |
protected static Command |
readCommand(java.io.DataInput in,
int ec,
int eid,
int l)
|
protected int |
sizeOfDirectColor()
|
protected int |
sizeOfEnum()
|
protected int |
sizeOfInt()
|
protected int |
sizeOfPoint()
|
protected int |
sizeOfVdc()
|
java.lang.String |
toString()
|
protected void |
unimplemented(java.lang.String message)
|
protected void |
unsupported(java.lang.String message)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] args
protected int currentArg
Constructor Detail |
---|
public Command(int ec, int eid, int l, java.io.DataInput in) throws java.io.IOException
ec
- The element classeid
- The element IDl
- The number of arguments for the commandin
- The input stream used to read the command
java.io.IOException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
protected final java.lang.String makeFixedString()
protected final java.lang.String makeString()
protected final byte makeByte()
protected final char makeChar()
protected final int makeSignedInt8()
protected final int makeSignedInt16()
protected final int makeSignedInt24()
protected final int makeSignedInt32()
protected final int makeInt()
protected final int sizeOfInt()
protected final int makeIndex()
protected final int makeName()
protected final int makeUInt(int precision)
protected final double makeVdc()
protected final int sizeOfVdc()
protected final double makeVc()
protected final double makeReal()
protected final double makeFixedPoint()
protected final double makeFloatingPoint()
protected final double makeFloatingPoint32()
protected final int makeEnum()
protected final int sizeOfEnum()
protected final java.awt.geom.Point2D.Double makePoint()
protected final int sizeOfPoint()
protected final int makeColorIndex()
protected final int makeColorIndex(int precision)
protected final java.awt.Color makeDirectColor()
protected final int sizeOfDirectColor()
protected final double makeFloat32(int i)
protected final double makeSizeSpecification(SpecificationMode specificationMode)
protected final StructuredDataRecord makeSDR()
protected final void alignOnWord()
public void paint(CGMDisplay d)
public static Command read(java.io.DataInput in) throws java.io.IOException
in
- Where to read the command from
null
if the end of stream was found
java.io.IOException
- On I/O errorprotected static Command readCommand(java.io.DataInput in, int ec, int eid, int l) throws java.io.IOException
java.io.IOException
protected final void info(java.lang.String message)
protected final void unsupported(java.lang.String message)
protected final void unimplemented(java.lang.String message)
public java.lang.Object clone()
clone
in class java.lang.Object
public int getElementClass()
public int getElementCode()
protected java.lang.String printShape(java.awt.Shape s)
s
- The shape to describe
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |