public class JDFXYPair extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparatorJDFBaseDataTypes.EnumFitsValueEPSILON, 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(int x,
int 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(java.lang.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(java.util.Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
JDFXYPair |
clone() |
static JDFXYPair |
createXYPair(java.lang.String s)
factory for JDFXYPair that silently returns null in case of illegal strings
|
java.awt.geom.Point2D |
getPoint2D() |
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
|
JDFXYPair |
setString(java.lang.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
|
JDFXYPair |
shift(double x,
double y) |
JDFXYPair |
shift(JDFXYPair xy) |
void |
swapXY()
swap x and y coordinates -
|
abs, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDouble, getDoubleList, getDoubleVector, getIntArray, getString, getString, hashCode, intAt, isValidString, matches, max, min, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setX, shift, sort, subtract, toString, unify, volumeadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic JDFXYPair()
@Deprecated
public JDFXYPair(java.util.Vector v)
throws java.util.zip.DataFormatException
v - Vector of Doublejava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic JDFXYPair(java.lang.String s)
throws java.util.zip.DataFormatException
s - the given Stringjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFXYPair(JDFNumList nl) throws java.util.zip.DataFormatException
nl - the given number listjava.util.zip.DataFormatException - - 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 JDFXYPair(int x,
int y)
x - the x coordinatey - the y coordinatepublic static JDFXYPair createXYPair(java.lang.String s)
s - the string to parsepublic boolean isValid()
throws java.util.zip.DataFormatException
isValid in class JDFNumListjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic double getX()
public java.awt.geom.Point2D getPoint2D()
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 JDFXYPair setString(java.lang.String string) throws java.util.zip.DataFormatException
setString in class JDFNumListjava.util.zip.DataFormatExceptionJDFNumList.setString(java.lang.String)public JDFXYPair shift(double x, double y)
x - y - public JDFXYPair clone()
clone in class JDFNumListJDFNumList.clone()