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

java.lang.Objectcom.port80.graph.impl.ShapeFactory
- All Implemented Interfaces:
- com.port80.util.attr.IAttrFactory
- public class ShapeFactory
- extends java.lang.Object
- implements com.port80.util.attr.IAttrFactory
- extends java.lang.Object
Shape attribute factory.
| Field Summary | |
private static int |
BOX
|
private static int |
CIRCLE
|
private static int |
CUSTOM
|
private static int |
DIAMOND
|
private static int |
DOUBLECIRCLE
|
private static int |
DOUBLEOCTAGON
|
private static int |
EGG
|
private static int |
HEXAGON
|
private static int |
HOUSE
|
private static ShapeFactory |
instance
|
private static int |
INVERTEDHOUSE
|
private static int |
INVERTEDTRAPEZIUM
|
private static int |
INVERTEDTRIANGLE
|
private static int |
LINE
|
private static int |
MCIRCLE
|
private static int |
MDIAMOND
|
private static int |
MRECORD
|
private static int |
MSQUARE
|
private static java.lang.String |
NAME
|
private static java.lang.String[] |
nameTable
|
private static int |
NONE
|
private static int |
OCTAGON
|
private static int |
OVAL
|
private static int |
PARALLELOGRAM
|
private static int |
PENTAGON
|
private static int |
PLAINTEXT
|
private static int |
POLYGON
|
private static int |
RECORD
|
private static int |
ROUNDEDBOX
|
private static int |
SQUARE
|
private static java.util.Map |
table
|
private static int |
TRAPEZIUM
|
private static int |
TRIANGLE
|
private static int |
TRIPLEOCTAGON
|
| Constructor Summary | |
private |
ShapeFactory()
|
| Method Summary | |
static com.port80.graph.IGraphShape |
create(java.lang.String stringvalue)
|
java.lang.Object |
createObject(java.lang.String attrvalue)
Create an instance of the specified shape. |
static ShapeFactory |
getInstance()
|
com.port80.graph.IGraphShape |
getStock(java.lang.String name)
Get a reference to the stock shape without cloning. |
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. |
private static com.port80.graph.IGraphShape |
stockCircle()
A circle. |
private static com.port80.graph.IGraphShape |
stockEllipse()
An ellipse. |
private static com.port80.graph.IGraphShape |
stockRectangle()
A rectangle. |
private static com.port80.graph.IGraphShape |
stockSquare()
A unit square. |
private static com.port80.graph.IGraphShape |
stockTriangle()
A triangle that enclose a unit square. |
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 ShapeFactory instance
NONE
private static final int NONE
- See Also:
- Constant Field Values
LINE
private static final int LINE
- See Also:
- Constant Field Values
TRIANGLE
private static final int TRIANGLE
- See Also:
- Constant Field Values
SQUARE
private static final int SQUARE
- See Also:
- Constant Field Values
BOX
private static final int BOX
- See Also:
- Constant Field Values
ROUNDEDBOX
private static final int ROUNDEDBOX
- See Also:
- Constant Field Values
RECORD
private static final int RECORD
- See Also:
- Constant Field Values
DIAMOND
private static final int DIAMOND
- See Also:
- Constant Field Values
PENTAGON
private static final int PENTAGON
- See Also:
- Constant Field Values
HEXAGON
private static final int HEXAGON
- See Also:
- Constant Field Values
OCTAGON
private static final int OCTAGON
- See Also:
- Constant Field Values
PARALLELOGRAM
private static final int PARALLELOGRAM
- See Also:
- Constant Field Values
TRAPEZIUM
private static final int TRAPEZIUM
- See Also:
- Constant Field Values
POLYGON
private static final int POLYGON
- See Also:
- Constant Field Values
CIRCLE
private static final int CIRCLE
- See Also:
- Constant Field Values
EGG
private static final int EGG
- See Also:
- Constant Field Values
OVAL
private static final int OVAL
- See Also:
- Constant Field Values
HOUSE
private static final int HOUSE
- See Also:
- Constant Field Values
PLAINTEXT
private static final int PLAINTEXT
- See Also:
- Constant Field Values
MSQUARE
private static final int MSQUARE
- See Also:
- Constant Field Values
MRECORD
private static final int MRECORD
- See Also:
- Constant Field Values
MDIAMOND
private static final int MDIAMOND
- See Also:
- Constant Field Values
MCIRCLE
private static final int MCIRCLE
- See Also:
- Constant Field Values
INVERTEDHOUSE
private static final int INVERTEDHOUSE
- See Also:
- Constant Field Values
INVERTEDTRAPEZIUM
private static final int INVERTEDTRAPEZIUM
- See Also:
- Constant Field Values
INVERTEDTRIANGLE
private static final int INVERTEDTRIANGLE
- See Also:
- Constant Field Values
DOUBLECIRCLE
private static final int DOUBLECIRCLE
- See Also:
- Constant Field Values
DOUBLEOCTAGON
private static final int DOUBLEOCTAGON
- See Also:
- Constant Field Values
TRIPLEOCTAGON
private static final int TRIPLEOCTAGON
- See Also:
- Constant Field Values
CUSTOM
private static final int CUSTOM
- See Also:
- Constant Field Values
nameTable
private static final java.lang.String[] nameTable
table
private static java.util.Map table
| Constructor Detail |
ShapeFactory
private ShapeFactory()
| Method Detail |
getInstance
public static ShapeFactory getInstance()
create
public static com.port80.graph.IGraphShape create(java.lang.String stringvalue)
stockTriangle
private static com.port80.graph.IGraphShape stockTriangle()
- A triangle that enclose a unit square.
stockSquare
private static com.port80.graph.IGraphShape stockSquare()
- A unit square.
stockRectangle
private static com.port80.graph.IGraphShape stockRectangle()
- A rectangle.
stockCircle
private static com.port80.graph.IGraphShape stockCircle()
- A circle.
stockEllipse
private static com.port80.graph.IGraphShape stockEllipse()
- An ellipse.
getStock
public com.port80.graph.IGraphShape getStock(java.lang.String name)
- Get a reference to the stock shape without cloning.
createObject
public java.lang.Object createObject(java.lang.String attrvalue)
- Create an instance of the specified shape.
- Specified by:
createObjectin interfacecom.port80.util.attr.IAttrFactory
isValid
public boolean isValid(java.lang.Object a)
- Description copied from interface:
com.port80.util.attr.IAttrFactory - Check that given object is valid value for this factory.
- Specified by:
isValidin interfacecom.port80.util.attr.IAttrFactory
toString
public java.lang.String toString(java.lang.Object attr)
- The String representation of an attribute value.
- Specified by:
toStringin interfacecom.port80.util.attr.IAttrFactory
toString
public java.lang.String toString()
- The String representation of attribute type itself.
- Specified by:
toStringin interfacecom.port80.util.attr.IAttrFactory
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 interfacecom.port80.util.attr.IAttrFactory
|
|||||||||
| Home >> All >> com >> port80 >> graph >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.port80.graph.impl.ShapeFactory