Package adams.core.base
Class QuadrilateralLocation
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.QuadrilateralLocation
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
public class QuadrilateralLocation extends AbstractBaseString
Wrapper for a quadrilateral location object to be editable in the GOE.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description QuadrilateralLocation()
Initializes the string with length 0.QuadrilateralLocation(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
Initializes the object with the string to parse.QuadrilateralLocation(georegression.struct.shapes.Quadrilateral_F64 location)
Initializes the object with the location to use.QuadrilateralLocation(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point2D
centerValue()
Returns the center of the quadrilateral.double[]
doubleValue()
Returns the location as array (x0, y0, ..., x3, y3).String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.georegression.struct.shapes.Quadrilateral_F64
quadrilateralValue()
Returns the quadrilateral location.Rectangle
rectangleValue()
Returns the location as rectangle that the quadrilateral object fits in.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, initialize, isEmpty, length, setValue, stringValue
-
Methods inherited from class adams.core.base.BaseObject
compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hasFavoritesSupport, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
-
-
-
-
Constructor Detail
-
QuadrilateralLocation
public QuadrilateralLocation()
Initializes the string with length 0.
-
QuadrilateralLocation
public QuadrilateralLocation(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
QuadrilateralLocation
public QuadrilateralLocation(georegression.struct.shapes.Quadrilateral_F64 location)
Initializes the object with the location to use.- Parameters:
location
- the location to use
-
QuadrilateralLocation
public QuadrilateralLocation(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
Initializes the object with the string to parse.- Parameters:
x0
- the x of the first cornery0
- the y of the first cornerx1
- the x of the second cornery1
- the y of the second cornerx2
- the x of the third cornery2
- the y of the third cornerx3
- the x of the fourth cornery3
- the y of the fourth corner
-
-
Method Detail
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValid
in classAbstractBaseString
- Parameters:
value
- the string value to check- Returns:
- true if non-null
-
doubleValue
public double[] doubleValue()
Returns the location as array (x0, y0, ..., x3, y3).- Returns:
- the location array
-
quadrilateralValue
public georegression.struct.shapes.Quadrilateral_F64 quadrilateralValue()
Returns the quadrilateral location.- Returns:
- the quadrilateral
-
rectangleValue
public Rectangle rectangleValue()
Returns the location as rectangle that the quadrilateral object fits in.- Returns:
- the rectangle
-
centerValue
public Point2D centerValue()
Returns the center of the quadrilateral.- Returns:
- the center
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipText
in classAbstractBaseString
- Returns:
- the tool tip
-
-