Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.draw2d.ui.geometry
Class PrecisionPointList

java.lang.Object
  extended by 

org.eclipse.draw2d.geometry.PointList
      extended by 
org.eclipse.gmf.runtime.draw2d.ui.geometry.PrecisionPointList
All Implemented Interfaces:
java.io.Serializable, Translatable

public class PrecisionPointList
extends PointList

Class implementing a list of PrecisionPoint similarly to PointList class.

See Also:
Serialized Form

Constructor Summary
PrecisionPointList ()
          Constructs an empty PrecisionPointList.
PrecisionPointList (double[] points)
          Constructs a PointList with the given points.
PrecisionPointList (int size)
          Constructs a PrecisionPointList with initial capacity size, but no points.
PrecisionPointList ( PointList pointList)
           
 
Method Summary
 void addAll ( PointList source)
           
 void addAll ( PrecisionPointList source)
          Appends all of the given points to this PrecisionPointList.
 void addPoint ( Point p)
           
 void addPrecisionPoint (double x, double y)
          Adds the input point values to this PointList.
  Rectangle getBounds ()
           
  PrecisionPointList getCopy ()
           
  Point getLastPoint ()
           
  Point getMidpoint ()
           
  Point getPoint (int index)
           
  Point getPoint ( Point p, int index)
           
 void insertPoint ( Point p, int index)
           
 void performScale (double factor)
           
 void performTranslate (int dx, int dy)
           
 void removeAllPoints ()
           
  Point removePoint (int index)
           
 void reverse ()
           
 void setPoint ( Point pt, int index)
           
 void setSize (int newSize)
           
 int size ()
           
 double[] toDoubleArray ()
          Returns the contents of this PrecisionPointList as a double array.
 int[] toIntArray ()
           
 void translate (int x, int y)
           
 void transpose ()
           
 
Methods inherited from class org.eclipse.draw2d.geometry. PointList
addPoint, getFirstPoint, intersects, polygonContainsPoint, polylineContainsPoint, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrecisionPointList

public PrecisionPointList()
Constructs an empty PrecisionPointList.


PrecisionPointList

public PrecisionPointList(double[] points)
Constructs a PointList with the given points.

Parameters:
points - double array where two consecutive double form the coordinates of a point

PrecisionPointList

public PrecisionPointList(int size)
Constructs a PrecisionPointList with initial capacity size, but no points.

Parameters:
size - Number of points to hold.

PrecisionPointList

public PrecisionPointList(
PointList pointList)
Method Detail

addAll

public void addAll(
PrecisionPointList source)
Appends all of the given points to this PrecisionPointList.

Parameters:
source - the source PrecisionPointlist

addAll

public void addAll(
PointList source)
Overrides:
addAll in class PointList

addPoint

public void addPoint(
Point p)
Overrides:
addPoint in class PointList

addPrecisionPoint

public void addPrecisionPoint(double x,
                              double y)
Adds the input point values to this PointList.

Parameters:
x - X value of a point to add
y - Y value of a point to add

getBounds

public 
Rectangle getBounds()
Overrides:
getBounds in class PointList

getCopy

public 
PrecisionPointList getCopy()
Overrides:
getCopy in class PointList

getLastPoint

public 
Point getLastPoint()
Overrides:
getLastPoint in class PointList

getMidpoint

public 
Point getMidpoint()
Overrides:
getMidpoint in class PointList

getPoint

public 
Point getPoint(int index)
Overrides:
getPoint in class PointList

getPoint

public 
Point getPoint(
Point p,
                      int index)
Overrides:
getPoint in class PointList

insertPoint

public void insertPoint(
Point p,
                        int index)
Overrides:
insertPoint in class PointList

performScale

public void performScale(double factor)
Specified by:
performScale in interface Translatable
Overrides:
performScale in class PointList

performTranslate

public void performTranslate(int dx,
                             int dy)
Specified by:
performTranslate in interface Translatable
Overrides:
performTranslate in class PointList

removeAllPoints

public void removeAllPoints()
Overrides:
removeAllPoints in class PointList

removePoint

public 
Point removePoint(int index)
Overrides:
removePoint in class PointList

reverse

public void reverse()
Overrides:
reverse in class PointList

setPoint

public void setPoint(
Point pt,
                     int index)
Overrides:
setPoint in class PointList

setSize

public void setSize(int newSize)
Overrides:
setSize in class PointList

size

public int size()
Overrides:
size in class PointList

toDoubleArray

public double[] toDoubleArray()
Returns the contents of this PrecisionPointList as a double array. The returned array is by reference. Any changes made to the array will also be changing the original PrecisionPointList.

Returns:
the integer array of points by reference

toIntArray

public int[] toIntArray()
Overrides:
toIntArray in class PointList

translate

public void translate(int x,
                      int y)
Overrides:
translate in class PointList

transpose

public void transpose()
Overrides:
transpose in class PointList

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire