|
|||||||||
| Home >> All >> com >> port80 >> util >> [ attr overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.port80.util.attr
Class PointFactory

java.lang.Objectcom.port80.util.attr.PointFactory
- All Implemented Interfaces:
- IAttrFactory
- public class PointFactory
- extends java.lang.Object
- implements IAttrFactory
- extends java.lang.Object
Point attribute factory. Since .dot file have coordinate system with origin at lower-left corner instead of upper-left corner used in java.awt, coordinates need to be converted when reading or writing to .dot file. DotMode convert between the two systems.
| Field Summary | |
private static PointFactory |
instance
|
private static boolean |
isDotMode
|
private static double |
maxY
|
private static java.lang.String |
NAME
|
| Constructor Summary | |
private |
PointFactory()
|
| Method Summary | |
static java.awt.geom.Point2D |
create(java.lang.String stringvalue)
|
java.lang.Object |
createObject(java.lang.String str)
Create an instance of route from the String spec. |
static void |
dotModeOff()
|
static void |
dotModeOn(double maxy)
|
static PointFactory |
getInstance()
|
boolean |
isValid(java.lang.Object a)
Check that given object is valid value for this factory. |
java.lang.Object |
promptUser(java.lang.String prompt)
Prompt user and present a user interface to obtain an attribute value from user. |
java.lang.String |
toString()
The String representation of attribute type itself. |
java.lang.String |
toString(java.lang.Object attr)
The String representation of an attribute value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
instance
private static PointFactory instance
isDotMode
private static boolean isDotMode
maxY
private static double maxY
| Constructor Detail |
PointFactory
private PointFactory()
| Method Detail |
dotModeOn
public static void dotModeOn(double maxy)
dotModeOff
public static void dotModeOff()
getInstance
public static PointFactory getInstance()
create
public static java.awt.geom.Point2D create(java.lang.String stringvalue)
createObject
public java.lang.Object createObject(java.lang.String str)
- Create an instance of route from the String spec.
Current accepted .dot file string format:
float x,float y
- Specified by:
createObjectin interfaceIAttrFactory
isValid
public boolean isValid(java.lang.Object a)
- Description copied from interface:
IAttrFactory - Check that given object is valid value for this factory.
- Specified by:
isValidin interfaceIAttrFactory
toString
public java.lang.String toString(java.lang.Object attr)
- The String representation of an attribute value.
- Specified by:
toStringin interfaceIAttrFactory
toString
public java.lang.String toString()
- The String representation of attribute type itself.
- Specified by:
toStringin interfaceIAttrFactory
promptUser
public java.lang.Object promptUser(java.lang.String prompt)
- Prompt user and present a user interface to obtain an
attribute value from user.
- Specified by:
promptUserin interfaceIAttrFactory
|
|||||||||
| Home >> All >> com >> port80 >> util >> [ attr overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.port80.util.attr.PointFactory