jfig.objects
Class FigArrow

java.lang.Object
  extended byjfig.objects.FigArrow

public class FigArrow
extends java.lang.Object

xfig-compatible arrow-heads for jfig lines.

FigArrow encapsulates all arrow handling for jfig:

    arrowMode : (see FigAttribs.java)

            SIMPLE_ARROW        = 2;
            TRIANGLE_ARROW      = 3;
            TRIANGLE_FILL_ARROW = 4;  
            BACK_ARROW          = 5;
            BACK_FILL_ARROW     = 6;
            ARC_ARROW           = 7;
            ARC_FILL_ARROW      = 8;
            SOLDERDOT_ARROW     = 16;
                    PA2
                    |\
                    |   \
                    |       \
    ----------  PA3 |          * PA1
                    |       /
                    |   /
                    |/
                    PA4


Field Summary
(package private)  java.awt.Point a1
           
(package private)  java.awt.Point a2
           
(package private)  java.awt.Point a3
           
(package private)  java.awt.Point a4
           
(package private)  boolean front
           
(package private)  double length
           
(package private)  FigObject parent
           
(package private)  int radius
           
(package private)  java.awt.Point sp
           
(package private)  int type
           
(package private)  FillWrapper wfill
           
(package private)  double width
           
(package private)  LineWrapper wline
           
 
Constructor Summary
FigArrow()
           
FigArrow(FigObject parent, java.awt.Point p1, java.awt.Point p2, boolean front)
          construct an arrow of type parent.getAttributes().arrowMode for the line from point p1 to point p2 (with coordinates in world coordinates.
 
Method Summary
static FigArrow create(FigObject parent, java.awt.Point p1, java.awt.Point p2, boolean front)
           
 void paint(java.awt.Graphics g)
          the paint method for an arrow.
 void print()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

a1

java.awt.Point a1

a2

java.awt.Point a2

a3

java.awt.Point a3

a4

java.awt.Point a4

sp

java.awt.Point sp

radius

int radius

front

boolean front

length

double length

width

double width

type

int type

parent

FigObject parent

wline

LineWrapper wline

wfill

FillWrapper wfill
Constructor Detail

FigArrow

public FigArrow()

FigArrow

public FigArrow(FigObject parent,
                java.awt.Point p1,
                java.awt.Point p2,
                boolean front)
construct an arrow of type parent.getAttributes().arrowMode for the line from point p1 to point p2 (with coordinates in world coordinates. As FIG3.1 allows different arrowheads on the front or back end of a polyline, the flag 'front' is used to select the corresponding end. 01.02.97: changed width -> 0.5*width to get xfig/transfig semantic

Method Detail

create

public static FigArrow create(FigObject parent,
                              java.awt.Point p1,
                              java.awt.Point p2,
                              boolean front)

paint

public void paint(java.awt.Graphics g)
the paint method for an arrow. This checks whether to draw a solderdot arrow and does so. Otherwise the paint() method for the previously created LineWrapper and FillWrapper objects is called.


toString

public java.lang.String toString()

print

public void print()