maslab.vis
Class VisLine

java.lang.Object
  extended by maslab.vis.VisObject
      extended by maslab.vis.VisLine

public class VisLine
extends VisObject

A straight line.


Field Summary
 java.awt.Color color
           
 float dashed
          If set to a value > 0, the line will be drawn dashed.
 double size
           
 double x1
           
 double x2
           
 double y1
           
 double y2
           
 
Fields inherited from class maslab.vis.VisObject
coordinateSpace, SCREENSPACE, WORLDSPACE
 
Constructor Summary
VisLine(java.awt.Color c, double size, double x1, double y1, double x2, double y2)
           
VisLine(java.awt.Color c, double size, double x1, double y1, double x2, double y2, float dashed)
           
VisLine(java.awt.Color c, double size, GLine2D line)
           
VisLine(java.awt.Color c, double size, GPoint2D p1, GPoint2D p2)
           
VisLine(java.awt.Color c, double size, GPoint2D p1, GPoint2D p2, float dashed)
           
 
Method Summary
 void paint(VisCanvas vc, java.awt.Graphics2D g, java.awt.image.BufferedImage bi)
          Overriden by each subclass to draw itself onto the provided graphics context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public double size

color

public java.awt.Color color

x1

public double x1

y1

public double y1

x2

public double x2

y2

public double y2

dashed

public float dashed
If set to a value > 0, the line will be drawn dashed.

Constructor Detail

VisLine

public VisLine(java.awt.Color c,
               double size,
               GLine2D line)

VisLine

public VisLine(java.awt.Color c,
               double size,
               GPoint2D p1,
               GPoint2D p2)

VisLine

public VisLine(java.awt.Color c,
               double size,
               GPoint2D p1,
               GPoint2D p2,
               float dashed)

VisLine

public VisLine(java.awt.Color c,
               double size,
               double x1,
               double y1,
               double x2,
               double y2)

VisLine

public VisLine(java.awt.Color c,
               double size,
               double x1,
               double y1,
               double x2,
               double y2,
               float dashed)
Method Detail

paint

public void paint(VisCanvas vc,
                  java.awt.Graphics2D g,
                  java.awt.image.BufferedImage bi)
Description copied from class: VisObject
Overriden by each subclass to draw itself onto the provided graphics context. Applications can choose to use either the Graphics2D (which has the correct transform already set up) or to draw to the buffered image directly.

Specified by:
paint in class VisObject