noope.output
Class OutputProjectionPointPropertyRecord

java.lang.Object
  |
  +--noope.laws.LawPropertyRecord
        |
        +--noope.output.OutputProjectionPropertyRecord
              |
              +--noope.output.OutputProjectionColoredPropertyRecord
                    |
                    +--noope.output.OutputProjectionPointPropertyRecord

public class OutputProjectionPointPropertyRecord
extends OutputProjectionColoredPropertyRecord

This is a LawPropertyRecord class associated with the OutputProjection law. It is the one of which an instance is returned by OutputProjection.createNewPropertyRecord by default, that is, if no class name is given as the parameter defining the LawPropertyRecord. It represents the object as a small square whose sidelength is given by pointSize (that is initialized to the value defaultPointSize if nothing else is given.

Version:
29 March 2001
Author:
Miklos Reiter

Field Summary
static double defaultPointSize
          The default pointSize.
protected  double pointSize
          The size of a point.
 
Fields inherited from class noope.output.OutputProjectionColoredPropertyRecord
color, defaultColor, oldX, oldY
 
Constructor Summary
OutputProjectionPointPropertyRecord(BlockReader br, Entity ent)
          Constructs a new OutputProjectionPointPropertyRecord object from the BlockReader br and for the Entity ent.
 
Method Summary
 void draw(java.awt.Graphics2D g, double X, double Y)
          This method draws a square of size pointSize on the Graphics object at the position (X,Y).
 
Methods inherited from class noope.output.OutputProjectionColoredPropertyRecord
lookupColor
 
Methods inherited from class noope.output.OutputProjectionPropertyRecord
paint
 
Methods inherited from class noope.laws.LawPropertyRecord
dispose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pointSize

protected double pointSize
The size of a point.

defaultPointSize

public static double defaultPointSize
The default pointSize.
Constructor Detail

OutputProjectionPointPropertyRecord

public OutputProjectionPointPropertyRecord(BlockReader br,
                                           Entity ent)
                                    throws BRLoadingException
Constructs a new OutputProjectionPointPropertyRecord object from the BlockReader br and for the Entity ent. The BlockReader can be empty or even null, in which case defaultColor is used. In addition to the fields loaded from br by the inherited constructor, it tries to load the double "pointSize", if it fails, it uses defaultPointSize. Caution: if pointSize is too small, the Entity won't appear at all!
Method Detail

draw

public void draw(java.awt.Graphics2D g,
                 double X,
                 double Y)
This method draws a square of size pointSize on the Graphics object at the position (X,Y).
Overrides:
draw in class OutputProjectionPropertyRecord