com.pentec.gui.aoi.aois
Class EllipticalAOI

java.lang.Object
  extended by com.pentec.gui.aoi.AoiAdapter
      extended by com.pentec.gui.aoi.aois.EllipticalAOI
All Implemented Interfaces:
AOI, java.awt.Shape

public class EllipticalAOI
extends AoiAdapter
implements AOI

Author:
Pender Technology

Field Summary
private  java.awt.geom.Ellipse2D.Float ellipse
           
 
Fields inherited from interface com.pentec.gui.aoi.AOI
DEFAULT_COLOR
 
Constructor Summary
EllipticalAOI(double x, double y, double width, double height)
           
EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi)
           
EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi, java.lang.String $Name)
           
EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi, java.lang.String $Name, boolean isFilled, java.awt.Color color)
           
EllipticalAOI(float x, float y, float width, float height)
           
EllipticalAOI(java.awt.Rectangle aoi)
           
EllipticalAOI(java.awt.Rectangle aoi, java.lang.String $Name)
           
 
Method Summary
 boolean contains(double x, double y)
          Is the point described contained within the AOI
 AOI duplicate()
          Create a new identical AOI (just like clone but returns an AOI instead of an Object for convenience)
 java.awt.Point getCenter()
          Get the center of the AOI.
 AoiEditor getEditor(DataFrame owner)
          Return an appropriate new editor for the AOI given the DataFrame the AOI is in
 int getHeight()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 AOI scale(APanel owner)
          Scale thes actual AOI coordinates to fit the APanel's current display size
 AOI scale(double dx, double dy)
          Returns a new scaled AOI
 void setCenter(java.awt.Point center)
          Set the AOI's position by recentering it
 void setCorner(int iX, int iY)
           
 void setHeight(int iHeight)
           
 void setRect(int iX, int iY, int iWidth, int iHeight)
           
 void setWidth(int iWidth)
           
 void setX(int iX)
           
 void setY(int iY)
           
 java.lang.String toString()
           
 void translate(double dx, double dy)
          Translate the AOI
 
Methods inherited from class com.pentec.gui.aoi.AoiAdapter
addChangeListener, contains, contains, contains, getBounds, getBounds2D, getChangeListeners, getColor, getEnclosure, getName, getPathIterator, getPathIterator, intersects, intersects, isFillEnabled, notifyListeners, removeChangeListener, setColor, setFillEnabled, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.pentec.gui.aoi.AOI
addChangeListener, getChangeListeners, getColor, getEnclosure, getName, isFillEnabled, removeChangeListener, setColor, setFillEnabled, setName
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

ellipse

private final java.awt.geom.Ellipse2D.Float ellipse
Constructor Detail

EllipticalAOI

public EllipticalAOI(double x,
                     double y,
                     double width,
                     double height)

EllipticalAOI

public EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi)

EllipticalAOI

public EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi,
                     java.lang.String $Name)

EllipticalAOI

public EllipticalAOI(java.awt.geom.Ellipse2D.Float aoi,
                     java.lang.String $Name,
                     boolean isFilled,
                     java.awt.Color color)

EllipticalAOI

public EllipticalAOI(float x,
                     float y,
                     float width,
                     float height)

EllipticalAOI

public EllipticalAOI(java.awt.Rectangle aoi)

EllipticalAOI

public EllipticalAOI(java.awt.Rectangle aoi,
                     java.lang.String $Name)
Method Detail

contains

public boolean contains(double x,
                        double y)
Description copied from class: AoiAdapter
Is the point described contained within the AOI

Specified by:
contains in interface java.awt.Shape
Overrides:
contains in class AoiAdapter
Parameters:
x - X coordinate
y - Y coordinate
Returns:
true if contained, false otherwise

duplicate

public AOI duplicate()
Description copied from interface: AOI
Create a new identical AOI (just like clone but returns an AOI instead of an Object for convenience)

Specified by:
duplicate in interface AOI
Returns:
new duplicate AOI

getCenter

public java.awt.Point getCenter()
Description copied from interface: AOI
Get the center of the AOI. If the AOI does not have a well defined center due to its irregular shape, a consistently chosen central point may be returned instead.

Specified by:
getCenter in interface AOI
Returns:
center point of the AOI

getEditor

public AoiEditor getEditor(DataFrame owner)
Description copied from interface: AOI
Return an appropriate new editor for the AOI given the DataFrame the AOI is in

Specified by:
getEditor in interface AOI
Parameters:
owner - DataFrame owning the AOI
Returns:
AoiEditor capable of handling the AOI properly

getHeight

public int getHeight()

getWidth

public int getWidth()

getX

public int getX()

getY

public int getY()

scale

public AOI scale(APanel owner)
Scale thes actual AOI coordinates to fit the APanel's current display size

Specified by:
scale in interface AOI
Parameters:
owner - APanel to which to scale
Returns:
new scaled AOI

scale

public AOI scale(double dx,
                 double dy)
Description copied from interface: AOI
Returns a new scaled AOI

Specified by:
scale in interface AOI
Parameters:
dx - X scale factor
dy - Y scale factor
Returns:
new scaled AOI

setCenter

public void setCenter(java.awt.Point center)
Description copied from interface: AOI
Set the AOI's position by recentering it

Specified by:
setCenter in interface AOI
Parameters:
center - new center point

setCorner

public void setCorner(int iX,
                      int iY)

setHeight

public void setHeight(int iHeight)

setRect

public void setRect(int iX,
                    int iY,
                    int iWidth,
                    int iHeight)

setWidth

public void setWidth(int iWidth)

setX

public void setX(int iX)

setY

public void setY(int iY)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

translate

public void translate(double dx,
                      double dy)
Description copied from interface: AOI
Translate the AOI

Specified by:
translate in interface AOI
Parameters:
dx - X translation amount
dy - Y translation amount