|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<Object>
org.cip4.jdflib.datatypes.JDFNumList
org.cip4.jdflib.datatypes.JDFXYPair
public class JDFXYPair
This class represents a x y pair (JDFXYPair). It is a whitespace separated list of 2 numbers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
JDFBaseDataTypes.EnumFitsValue |
| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Fields inherited from interface org.cip4.jdflib.datatypes.JDFBaseDataTypes |
|---|
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION |
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
static JDFXYPair |
createXYPair(String s)
factory for JDFXYPair that silently returns null in case of illegal strings |
boolean |
equals(Object other)
equals - returns true if both JDFShapes are equal, otherwise false |
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 - |
| Methods inherited from class org.cip4.jdflib.datatypes.JDFNumList |
|---|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, getDoubleList, getIntArray, getString, getString, hashCode, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, subtract, toString, unify |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public JDFXYPair()
@Deprecated
public JDFXYPair(Vector v)
throws DataFormatException
v - Vector of Double
DataFormatException - - if the Vector has not a valid format
public JDFXYPair(String s)
throws DataFormatException
s - the given String
DataFormatException - - if the String has not a valid format
public JDFXYPair(JDFNumList nl)
throws DataFormatException
nl - the given number list
DataFormatException - - if the JDFNumberList has not a valid formatpublic JDFXYPair(JDFShape shape)
shape - the given number listpublic JDFXYPair(JDFXYPair nl)
nl - the given number list
public JDFXYPair(double x,
double y)
x - the x coordinatey - the y coordinate| Method Detail |
|---|
public static JDFXYPair createXYPair(String s)
s - the string to parse
public 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 equals(Object other)
equals in interface Collection<Object>equals in interface List<Object>equals in class JDFNumListpublic boolean isGreaterOrEqual(JDFXYPair x)
x - the JDFXYPair object to compare to
public boolean isLessOrEqual(JDFXYPair x)
x - the JDFXYPair object to compare to
public boolean isGreater(JDFXYPair x)
x - the JDFXYPair object to compare to
public boolean isPortrait()
public boolean isLess(JDFXYPair x)
x - the JDFXYPair object to compare to
public void setString(String string)
throws DataFormatException
setString in class JDFNumListDataFormatExceptionJDFNumList.setString(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||