Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.graph.dot.impl
Class DotPolyline  view DotPolyline download DotPolyline.java

java.lang.Object
  extended bycom.port80.graph.dot.impl.DotPolyline

public class DotPolyline
extends java.lang.Object

Wrapper of a dynamic allocated array of pre-allocated DotPoint. The point array are pre-allocated with DotPoint so they can be reused without having to be re-allocated each time. . The class keep its own copy of the points so prevent cross linking with other objects.


Field Summary
 boolean isClosed
           
private static java.lang.String NAME
           
 DotPoint[] pts
           
 int size
           
 
Constructor Summary
DotPolyline()
           
DotPolyline(int n)
           
 
Method Summary
 void add(DotPoint pt)
           
 void add(double x, double y)
           
 void close()
          Close the polyline as a polygon with the starting point at the end, so we don't have to wrap around to 0.
 DotPoint get(int i)
           
 void grow(int n)
           
 void growTo(int max)
           
 boolean isClosed()
           
 DotPolyline reset()
           
 int size()
           
 java.lang.String toGeneralPath()
           
 java.lang.String toGeneralPath(int lwidth)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

pts

public DotPoint[] pts

size

public int size

isClosed

public boolean isClosed
Constructor Detail

DotPolyline

public DotPolyline()

DotPolyline

public DotPolyline(int n)
Method Detail

add

public void add(DotPoint pt)

add

public void add(double x,
                double y)

get

public DotPoint get(int i)

size

public int size()

reset

public DotPolyline reset()

close

public void close()
Close the polyline as a polygon with the starting point at the end, so we don't have to wrap around to 0.


isClosed

public boolean isClosed()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


toGeneralPath

public java.lang.String toGeneralPath()

toGeneralPath

public java.lang.String toGeneralPath(int lwidth)

grow

public void grow(int n)

growTo

public void growTo(int max)