|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodeblocks.BlockConnectorShape
public class BlockConnectorShape
BlockConnectionShape defines and draws the connectors between the blocks. This includes the different (command/data) (sockets/plugs). The standard sockets/plugs have varying styles. BlockConnectionShape doesn't care about the layout of the connectors on the blocks, that is the job of BlockShape. BlockConnectionShape is extendable to allow for 3rd party (command/data) (sockets/plugs) shapes.
Field Summary | |
---|---|
static int |
CIRCLE_1
|
static int |
CIRCLE_2
|
static int |
CIRCLE_3
|
static int |
COMMAND
|
static float |
COMMAND_INPUT_BAR_HEIGHT
height of command input bar |
static float |
COMMAND_INPUT_BAR_WIDTH
width of command input bar |
static float |
CONTROL_PLUG_HEIGHT
height of vertical control connection |
static float |
CONTROL_PLUG_WIDTH
width of vertical control connection |
static float |
DATA_PLUG_HEIGHT
height of horizontal-plug/socket |
static boolean |
DEBUG_MODE
|
static float |
DEFAULT_COMMAND_INPUT_HEIGHT
default height of command input |
static float |
NORMAL_DATA_PLUG_WIDTH
Width of most plug shapes |
static int |
POLYMORPHIC_1
|
static int |
POLYMORPHIC_2
|
static int |
POLYMORPHIC_3
|
static float |
POLYMORPHIC_DATA_PLUG_WIDTH
Width of polymorphic plug shape |
static int |
PROC_PARAM
|
static int |
SQUARE_1
|
static int |
SQUARE_2
|
static int |
SQUARE_3
|
static int |
TRIANGLE_1
Different styles of SocketShapes: 1 is the normal shape 2 is the double stacked shape 3 is the double inversion |
static int |
TRIANGLE_2
|
static int |
TRIANGLE_3
|
Constructor Summary | |
---|---|
BlockConnectorShape()
|
Method Summary | |
---|---|
java.awt.geom.Point2D |
addCommandSocket(java.awt.geom.GeneralPath blockPath,
int commandSocketHeight)
|
static void |
addConnenctionShapeMapping(java.lang.String shapeName,
int integer)
Add a mapping of an application specific string of a connection shape to a shape identifying integer |
java.awt.geom.Point2D |
addControlConnectorShape(java.awt.geom.GeneralPath blockPath,
boolean appendRight)
|
java.awt.geom.Point2D |
addControlConnectorShape(java.awt.geom.GeneralPath blockPath,
float distanceToCenter,
boolean appendRight)
|
java.awt.geom.Point2D |
addDataPlug(java.awt.geom.GeneralPath blockPath,
java.lang.String connectionShape,
boolean onRightSide)
Appends a dataSocket to the blockPath given. |
java.awt.geom.Point2D |
addDataPlugUp(java.awt.geom.GeneralPath blockPath,
java.lang.String connectionShape,
boolean onRightSide)
|
java.awt.geom.Point2D |
addDataSocket(java.awt.geom.GeneralPath blockPath,
java.lang.String connectionShape,
boolean onRightSide)
Appends a dataPlug to the blockPath given. |
java.awt.geom.Point2D |
addDataSocketUp(java.awt.geom.GeneralPath blockPath,
java.lang.String connectionShape,
boolean onRightSide)
|
static java.lang.String |
getCommandShapeName()
|
static java.awt.Dimension |
getConnectorDimensions(BlockConnector blockConnector)
Gets the dimension of a given BlockConnector. |
static int |
getConnenctionShapeMapping(java.lang.String shapeName)
Get a shape identifying integer mapped to an application specific string of a connection shape |
static boolean |
isCommandConnector(BlockConnector connector)
|
static void |
loadBlockConnectorShapes(org.w3c.dom.Element root)
Loads the all the initial BlockConnectorShapes of this language |
static void |
resetConnectorShapeMappings()
Resets all the connector shape names to connector shape mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float DATA_PLUG_HEIGHT
public static final float NORMAL_DATA_PLUG_WIDTH
public static final float POLYMORPHIC_DATA_PLUG_WIDTH
public static final float CONTROL_PLUG_WIDTH
public static final float CONTROL_PLUG_HEIGHT
public static final float COMMAND_INPUT_BAR_WIDTH
public static final float COMMAND_INPUT_BAR_HEIGHT
public static final float DEFAULT_COMMAND_INPUT_HEIGHT
public static final int TRIANGLE_1
public static final int TRIANGLE_2
public static final int TRIANGLE_3
public static final int CIRCLE_1
public static final int CIRCLE_2
public static final int CIRCLE_3
public static final int SQUARE_1
public static final int SQUARE_2
public static final int SQUARE_3
public static final int POLYMORPHIC_1
public static final int POLYMORPHIC_2
public static final int POLYMORPHIC_3
public static final int PROC_PARAM
public static final int COMMAND
public static final boolean DEBUG_MODE
Constructor Detail |
---|
public BlockConnectorShape()
Method Detail |
---|
public static void addConnenctionShapeMapping(java.lang.String shapeName, int integer)
public static void resetConnectorShapeMappings()
public static int getConnenctionShapeMapping(java.lang.String shapeName)
public static java.awt.Dimension getConnectorDimensions(BlockConnector blockConnector)
public java.awt.geom.Point2D addControlConnectorShape(java.awt.geom.GeneralPath blockPath, boolean appendRight)
public java.awt.geom.Point2D addControlConnectorShape(java.awt.geom.GeneralPath blockPath, float distanceToCenter, boolean appendRight)
public java.awt.geom.Point2D addCommandSocket(java.awt.geom.GeneralPath blockPath, int commandSocketHeight)
public java.awt.geom.Point2D addDataSocket(java.awt.geom.GeneralPath blockPath, java.lang.String connectionShape, boolean onRightSide)
blockPath
- the current GeneralPath of the block being drawnconnectionShape
- specifies the socket shape to be addedonRightSide
- (note this method assumes startingFromTop)public java.awt.geom.Point2D addDataSocketUp(java.awt.geom.GeneralPath blockPath, java.lang.String connectionShape, boolean onRightSide)
public java.awt.geom.Point2D addDataPlug(java.awt.geom.GeneralPath blockPath, java.lang.String connectionShape, boolean onRightSide)
blockPath
- the current GeneralPath of the block being drawnconnectionShape
- specifies the socket shape to be addedonRightSide
- (note this method assumes startingFromTop)public java.awt.geom.Point2D addDataPlugUp(java.awt.geom.GeneralPath blockPath, java.lang.String connectionShape, boolean onRightSide)
public static void loadBlockConnectorShapes(org.w3c.dom.Element root)
root
- the Element carrying the specifications of the BlockConnectorShapespublic static boolean isCommandConnector(BlockConnector connector)
public static java.lang.String getCommandShapeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |