Package adams.core.base
Class BasePointFloat
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.BasePointFloat
-
- All Implemented Interfaces:
CloneHandler<BaseObject>
,Serializable
,Comparable
public class BasePointFloat extends AbstractBaseString
Wrapper for aPoint2D.Float
object to be editable in the GOE. Format: x;y- Version:
- $Revision: 10214 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT
the default value.static String
SEPARATOR
the separator.-
Fields inherited from class adams.core.base.BaseObject
m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
-
-
Constructor Summary
Constructors Constructor Description BasePointFloat()
Initializes the string with length 0.BasePointFloat(Point2D.Float value)
Initializes the object with the given value.BasePointFloat(Float x, Float y)
Initializes the object with the given value.BasePointFloat(String s)
Initializes the object with the string to parse.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).protected void
initialize()
Initializes the internal object.boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.Point2D.Float
parse(String s)
Parses the string ("x;y").Point2D.Float
pointValue()
Returns thePoint2D.Float
value.static String
toString(Point2D.Float d)
Turns aPoint2D.Float
object into a string.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, 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
-
-
-
-
Field Detail
-
SEPARATOR
public static final String SEPARATOR
the separator.- See Also:
- Constant Field Values
-
DEFAULT
public static final String DEFAULT
the default value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BasePointFloat
public BasePointFloat()
Initializes the string with length 0.
-
BasePointFloat
public BasePointFloat(String s)
Initializes the object with the string to parse.- Parameters:
s
- the string to parse
-
BasePointFloat
public BasePointFloat(Point2D.Float value)
Initializes the object with the given value.- Parameters:
value
- the value to use
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the internal object.- Overrides:
initialize
in classAbstractBaseString
-
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 parseable boolean
-
pointValue
public Point2D.Float pointValue()
Returns thePoint2D.Float
value.- Returns:
- the point value
-
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
-
toString
public static String toString(Point2D.Float d)
Turns aPoint2D.Float
object into a string.- Parameters:
d
- the object to convert- Returns:
- the generated string
-
parse
public Point2D.Float parse(String s)
Parses the string ("x;y").- Parameters:
s
- the string to parse- Returns:
- the generated
Point2D.Float
object, null if failed to parse
-
-