public class JDFXYPair extends JDFNumList
JDFBaseDataTypes.EnumFitsValuecapacityIncrement, elementCount, elementDatamodCountEPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFXYPair()
constructs a xy pair with all values set to 0.0 Double
|
JDFXYPair(double x,
double y)
constructs a new JDFXYPair with the given double values
|
JDFXYPair(JDFNumList nl)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(JDFShape shape)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(JDFXYPair nl)
constructs a xy pair with all values set via a JDFNumberList
|
JDFXYPair(String s)
constructs a xy pair with all values set via a String
if a single numerical value is specified, s is padded with " 0"
|
JDFXYPair(Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
static JDFXYPair |
createXYPair(String s)
factory for JDFXYPair that silently returns null in case of illegal strings
|
double |
getX()
getX - returns the x coordinate
|
double |
getY()
getY - returns the y coordinate
|
boolean |
isGreater(JDFXYPair x)
isGreater - equality operator >
|
boolean |
isGreaterOrEqual(JDFXYPair x)
isGreaterOrEqual - equality operator >=
|
boolean |
isLess(JDFXYPair x)
isLess - equality operator <
|
boolean |
isLessOrEqual(JDFXYPair x)
isLessOrEqual - equality operator <=
|
boolean |
isPortrait()
return true if y is > x
|
boolean |
isValid()
isValid - valid if the size of the vector is 2 and all instances are Double types
|
void |
setString(String string)
setString with some heuristics to allow for a single numerical or values like "i/j"
|
void |
setX(double x)
setX - sets the x coordinate
|
void |
setY(double y)
setY - sets the y coordinate
|
void |
swapXY()
swap x and y coordinates -
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDoubleList, getIntArray, getString, getString, hashCode, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, subtract, toString, unifyadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSizepublic JDFXYPair()
@Deprecated public JDFXYPair(Vector v) throws DataFormatException
v - Vector of DoubleDataFormatException - - if the Vector has not a valid formatpublic JDFXYPair(String s) throws DataFormatException
s - the given StringDataFormatException - - if the String has not a valid formatpublic JDFXYPair(JDFNumList nl) throws DataFormatException
nl - the given number listDataFormatException - - if the JDFNumberList has not a valid formatpublic JDFXYPair(JDFShape shape)
shape - the given number listpublic JDFXYPair(JDFXYPair nl)
nl - the given number listpublic JDFXYPair(double x,
double y)
x - the x coordinatey - the y coordinatepublic static JDFXYPair createXYPair(String s)
s - the string to parsepublic boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic double getX()
public void setX(double x)
x - the x coordinatepublic double getY()
public void swapXY()
public void setY(double y)
y - the y coordinatepublic boolean isGreaterOrEqual(JDFXYPair x)
x - the JDFXYPair object to compare topublic boolean isLessOrEqual(JDFXYPair x)
x - the JDFXYPair object to compare topublic boolean isGreater(JDFXYPair x)
x - the JDFXYPair object to compare topublic boolean isPortrait()
public boolean isLess(JDFXYPair x)
x - the JDFXYPair object to compare topublic void setString(String string) throws DataFormatException
setString in class JDFNumListDataFormatExceptionJDFNumList.setString(java.lang.String)Copyright © 2013. All Rights Reserved.