jBPM Designer - Backend 6.0.3-SNAPSHOT

org.jbpm.designer.server.diagram
Class Shape

java.lang.Object
  extended by org.jbpm.designer.server.diagram.Shape
All Implemented Interfaces:
Bounded, Stencil
Direct Known Subclasses:
Diagram

public class Shape
extends Object
implements Stencil, Bounded


Constructor Summary
Shape(String resourceId)
          set a new id for the shape
Shape(String resourceId, StencilType stencil)
          Constructs a new shape with id and stencil
 
Method Summary
 boolean addGlossaryIds(String id)
           
 boolean addIncoming(Shape current)
           
 boolean addOutgoing(Shape out)
          Adds a new shape to the outgoings
 boolean equals(Object obj)
           
 Bounds getBounds()
          Returns the bounds of a shape.
 ArrayList<Shape> getChildShapes()
           
 ArrayList<Point> getDockers()
          Gives the point list of dockers for a shape, dockers usually appears on edges
 ArrayList<String> getGlossaryIds()
           
 double getHeight()
           
 ArrayList<Shape> getIncomings()
           
 Point getLowerRight()
           
 ArrayList<Shape> getOutgoing()
          Deprecated. 
 ArrayList<Shape> getOutgoings()
          Give an array of outgoing shapes
 Shape getParent()
           
 HashMap<String,String> getProperties()
          return a HashMap with all properties, name as key, value as value
 String getProperty(String name)
          Gives the value of the property with the given name
 String getResourceId()
          returns the unique shape id, generated by the editor
 StencilType getStencil()
          Gives the Stencil object of the shape
 String getStencilId()
          Gives the stencil id of an object
 Shape getTarget()
          Gives the target of shape, which defined another associated shape
 Point getUpperLeft()
           
 double getWidth()
           
 int hashCode()
           
 String putProperty(String key, String value)
          changes an existing property with the same name, or adds a new one
 void setBounds(Bounds bounds)
          Set a new bounds for a shape
 void setChildShapes(ArrayList<Shape> childShapes)
           
 void setDockers(ArrayList<Point> dockers)
          set a ArrayList with all attached dockers for a shape, dockers usually appears on edges A docker is a point on the canvas
 void setGlossaryIds(ArrayList<String> glossaryIds)
           
 void setIncomings(ArrayList<Shape> cur)
           
 void setOutgoing(ArrayList<Shape> outgoing)
          Deprecated. 
 void setOutgoings(ArrayList<Shape> outgoings)
          Set a new array of outgoing shapes
 void setParent(Shape parent)
           
 void setProperties(HashMap<String,String> properties)
          set a new property hash map
 void setResourceId(String resourceId)
          set unique shape id, usually generated by the editor
 void setStencil(StencilType stencil)
          Set a new Stencil Object for the shape
 void setTarget(Shape target)
          Set a new target shape for a shape
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shape

public Shape(String resourceId,
             StencilType stencil)
Constructs a new shape with id and stencil

Parameters:
resourceId - unique shape id, generated by the editor
stencil - StencilType with stencilId

Shape

public Shape(String resourceId)
set a new id for the shape

Parameters:
resourceId -
Method Detail

getParent

public Shape getParent()
Returns:
the parent

setParent

public void setParent(Shape parent)
Parameters:
parent - the parent to set

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getStencilId

public String getStencilId()
Description copied from interface: Stencil
Gives the stencil id of an object

Specified by:
getStencilId in interface Stencil
Returns:
the id of an associated stencil

getResourceId

public String getResourceId()
returns the unique shape id, generated by the editor

Returns:
the resourceId

setResourceId

public void setResourceId(String resourceId)
set unique shape id, usually generated by the editor

Parameters:
resourceId - the resourceId to set

getProperty

public String getProperty(String name)
Gives the value of the property with the given name

Parameters:
name - name of the property
Returns:
value of the property or null if no mapping available for the name

getProperties

public HashMap<String,String> getProperties()
return a HashMap with all properties, name as key, value as value

Returns:
the properties

setProperties

public void setProperties(HashMap<String,String> properties)
set a new property hash map

Parameters:
properties - the properties to set

putProperty

public String putProperty(String key,
                          String value)
changes an existing property with the same name, or adds a new one

Parameters:
key - property name with which the specified value is to be associated
value - value to be associated with the specified property name
Returns:
the previous value associated with property name, or null if there was no mapping for property name. (A null return can also indicate that the map previously associated null with key.)

getStencil

public StencilType getStencil()
Gives the Stencil object of the shape

Returns:
the stencil associated with the shape

setStencil

public void setStencil(StencilType stencil)
Set a new Stencil Object for the shape

Parameters:
stencil - the stencil to set

getChildShapes

public ArrayList<Shape> getChildShapes()
Returns:
the childShapes

setChildShapes

public void setChildShapes(ArrayList<Shape> childShapes)
Parameters:
childShapes - the childShapes to set

getOutgoing

@Deprecated
public ArrayList<Shape> getOutgoing()
Deprecated. 


setOutgoing

@Deprecated
public void setOutgoing(ArrayList<Shape> outgoing)
Deprecated. 


getOutgoings

public ArrayList<Shape> getOutgoings()
Give an array of outgoing shapes

Returns:
the outgoing shape objects of the shape

setOutgoings

public void setOutgoings(ArrayList<Shape> outgoings)
Set a new array of outgoing shapes

Parameters:
outgoings - the outgoing shapes to set

addOutgoing

public boolean addOutgoing(Shape out)
Adds a new shape to the outgoings

Parameters:
outgoing - shape to append
Returns:
true if add was successful

getDockers

public ArrayList<Point> getDockers()
Gives the point list of dockers for a shape, dockers usually appears on edges

Returns:
the dockers, a list of points

setDockers

public void setDockers(ArrayList<Point> dockers)
set a ArrayList with all attached dockers for a shape, dockers usually appears on edges A docker is a point on the canvas

Parameters:
dockers - the list of points to set

getTarget

public Shape getTarget()
Gives the target of shape, which defined another associated shape

Returns:
the target shape

setTarget

public void setTarget(Shape target)
Set a new target shape for a shape

Parameters:
target - the target shape to set

getBounds

public Bounds getBounds()
Returns the bounds of a shape. Bounds defined the space a shape spans over the canvas

Returns:
the bounds object of a shape

setBounds

public void setBounds(Bounds bounds)
Set a new bounds for a shape

Parameters:
bounds - the bounds to set

getUpperLeft

public Point getUpperLeft()
Specified by:
getUpperLeft in interface Bounded
Returns:
Point Object of the upper left

getLowerRight

public Point getLowerRight()
Specified by:
getLowerRight in interface Bounded
Returns:
Point Object of the lower right

getGlossaryIds

public ArrayList<String> getGlossaryIds()
Returns:
the glossaryIds

setGlossaryIds

public void setGlossaryIds(ArrayList<String> glossaryIds)
Parameters:
glossaryIds - the glossaryIds to set

addGlossaryIds

public boolean addGlossaryIds(String id)

addIncoming

public boolean addIncoming(Shape current)

getIncomings

public ArrayList<Shape> getIncomings()

setIncomings

public void setIncomings(ArrayList<Shape> cur)

getHeight

public double getHeight()
Specified by:
getHeight in interface Bounded
Returns:
The height of the spanned area

getWidth

public double getWidth()
Specified by:
getWidth in interface Bounded
Returns:
The width of the spanned area

jBPM Designer - Backend 6.0.3-SNAPSHOT

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.