|
||||||||||
| 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.JDFShape
public class JDFShape
This class is a representation of a JDFShape. It is a blank separated list of double values consisting of a width(x), a height(y) and a depth(z) value. this spans a standard right-handed xyz coordinate system
| 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 | |
|---|---|
JDFShape()
constructor - constructs a shape with all values set to 0.0 Double |
|
JDFShape(double x,
double y)
constructor - constructs a new JDFShape with the given 2 double values third is default = 0. |
|
JDFShape(double x,
double y,
double z)
constructor - constructs a new JDFShape with the given double values |
|
JDFShape(JDFNumList nl)
constructor - constructs a shape with all values set via a JDFNumberList |
|
JDFShape(JDFShape nl)
constructor - constructs a shape with all values set via a JDFNumberList |
|
JDFShape(String s)
constructor - constructs a shape with all values set via a String |
|
JDFShape(Vector v)
Deprecated. use typesafe constructors |
|
| Method Summary | |
|---|---|
static JDFShape |
createShape(String s)
factory for JDFShape that silently returns null in case of illegal strings |
boolean |
equals(Object other)
equals - returns true if both JDFShapes are equal, otherwise false |
double |
getHeight()
Deprecated. use getY - attention height and width were accidentally exchanged |
double |
getLength()
Deprecated. use getZ |
double |
getWidth()
Deprecated. use getX - attention height and width were accidentally exchanged |
double |
getX()
getX - returns the width |
double |
getY()
getY - returns the width |
double |
getZ()
getZ - returns the z value |
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract |
boolean |
isGreater(JDFShape x)
isGreater - equality operator > |
boolean |
isGreaterOrEqual(JDFShape x)
isGreaterOrEqual - equality operator >= |
boolean |
isLess(JDFShape x)
isLess - equality operator < |
boolean |
isLessOrEqual(JDFShape x)
isLessOrEqual - equality operator <= |
boolean |
isValid()
isValid - true if the size of the vector is 3 and all instances are Double types |
void |
setHeight(double height)
Deprecated. attention height and width were accidentally exchanged |
void |
setLength(double length)
Deprecated. |
void |
setWidth(double width)
Deprecated. attention height and width were accidentally exchanged |
void |
setX(double x)
setWidth - sets the x value |
void |
setY(double y)
setY - sets the height |
void |
setZ(double z)
set the z value |
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, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, setString, 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 JDFShape()
@Deprecated
public JDFShape(Vector v)
throws DataFormatException
v - the given vector
DataFormatException - - if the Vector has not a valid format
public JDFShape(String s)
throws DataFormatException
s - the given String
DataFormatException - - if the String has not a valid format
public JDFShape(JDFNumList nl)
throws DataFormatException
nl - the given number list
DataFormatException - - if the JDFNumberList has not a valid formatpublic JDFShape(JDFShape nl)
nl - the given number list
public JDFShape(double x,
double y,
double z)
x - the x valuey - the y valuez - the z value
public JDFShape(double x,
double y)
x - the widthy - the height| Method Detail |
|---|
public static JDFShape createShape(String s)
s - the string to parse - if JDFXYPair compatible, a 0 z dimension value is assumed
public void swapXY()
public boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic boolean equals(Object other)
equals in interface Collection<Object>equals in interface List<Object>equals in class JDFNumListpublic int hashCode()
hashCode in interface Collection<Object>hashCode in interface List<Object>hashCode in class JDFNumListpublic boolean isGreaterOrEqual(JDFShape x)
x - the JDFShape object to compare to
public boolean isLessOrEqual(JDFShape x)
x - the JDFShape object to compare to
public boolean isGreater(JDFShape x)
x - the JDFShape object to compare to
public boolean isLess(JDFShape x)
x - the JDFShape object to compare to
@Deprecated public double getHeight()
public double getY()
@Deprecated public void setHeight(double height)
height - the heightpublic void setY(double y)
y - the height@Deprecated public double getWidth()
public double getX()
public void setX(double x)
x - the width@Deprecated public void setWidth(double width)
width - the width@Deprecated public double getLength()
public double getZ()
@Deprecated public void setLength(double length)
length - the lengthpublic void setZ(double z)
z -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||