|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface TemplateDocument is responsible for creating templates
of repository items and new composites.
Primitive collections and
plays the AttributableOnSet role.
| Field Summary |
| Fields inherited from interface com.tensegrity.gui.document.Document |
GLUE_LEFTBOTTOM, GLUE_LEFTCENTEREXTEND, GLUE_LEFTTOP, GLUE_RIGHTBOTTOM, GLUE_RIGHTCENTEREXTEND, GLUE_RIGHTTOP, TYPE_FIXED_SIZE, TYPE_PACK_IS_OK, TYPE_TOOLDOCUMENT |
| Method Summary | |
void |
addNodeForPrimitive(BaseComposite bcomposite,
Primitive primitive)
Adds a VisualNode, which wraps the given primitive, to this document. |
void |
addNodeForPrimitive(Primitive primitive)
Adds a VisualNode, which wraps the given primitive, to this document. |
void |
addVisualGraphObject(VisualGraphObject visualgraphobject,
int x,
int y)
Adds a VisualGraphObject to this document. |
void |
deselect()
Method deselect delesects all currently selected elements of this document. |
java.util.Map |
getElementsMap()
This method should create map, where either primitives of the document are mapped towards their enclosing composites, or container elements are mapped to a list composite-primitive tuple. |
GraphPanel |
getGraphPanel()
Returns the graphpanel inside this graphdocument. |
java.util.List |
getSelection()
Method getSelection returns a list with all currently selected elements. |
AttributableOnSet |
getTemplateAttributable()
Method getTemplateAttributable returns an AttributableOnSet
describing all the properties of this document. |
void |
init(TemplateAttributableOnSet attributable)
Should be called whenever you create a TemplateDocument.
|
boolean |
isInPointMode()
Should return true, when the user activates the point mode, otherwise false. |
boolean |
isShowGrid()
Method isShowGrid returns true, if a grid is shown, otherwise false. |
boolean |
isSnapToGrid()
Method isSnapToGrid returns true, if the all elements within the document should snap to the nearest grid point or not. |
void |
removeAllPrimitives()
Method removeAllPrimitives removes all Primitives from this document. |
void |
removePrimitive(Primitive primitive)
Method removePrimitive removes a specific primitive from this document. |
void |
repaint()
Method repaint triggers a repaint of the document. |
void |
selectAll()
Method selectAll selects all Elements of this document. |
void |
setPopupMenuSource(JPopupMenuSourceWithUpdateUI popup)
Allows users of this class to set an SwingPopupMenu for this document instance. |
void |
setShowGrid(boolean b)
Method setShowGrid toggles whether a grid is shown or not. |
void |
setSnapToGrid(boolean b)
Method setSnapToGrid toggles the snap-to-grid mode. |
void |
togglePointMode()
Method togglePolygonMode toggles the edit-polygon mode. |
| Methods inherited from interface com.tensegrity.gui.document.Document |
closeHandler, getCopyCounter, getDocumentDataProvider, getDocumentSetting, getDocumentSettings, getFile, getFlags, isModified, setDocumentSetting, setDocumentSettings, setFile, setModified, setUnmodified |
| Methods inherited from interface com.tensegrity.generic.util.Observer |
update |
| Methods inherited from interface com.tensegrity.gui.container.Container |
getApplicationFrame, getName, setName, setSelected |
| Methods inherited from interface com.tensegrity.generic.attribute.event.AttributableOnSetListener |
attributesChanged |
| Method Detail |
public void addVisualGraphObject(VisualGraphObject visualgraphobject,
int x,
int y)
visualgraphobject - object to add.x - x positiony - y positionpublic void addNodeForPrimitive(Primitive primitive)
primitive - the new primitive to add.
public void addNodeForPrimitive(BaseComposite bcomposite,
Primitive primitive)
bcomposite - the composite to use to obtain sizes and positions.primitive - the primitive to add.public void deselect()
public java.util.Map getElementsMap()
Primitive's are mapped to their
enclosing Composite's.public java.util.List getSelection()
public AttributableOnSet getTemplateAttributable()
AttributableOnSet
describing all the properties of this document. This
AttributableOnSet should structured in Categories which
contain the category specific attributes.
AttributeTablepublic void init(TemplateAttributableOnSet attributable)
TemplateDocument.
This method sets the associated TemplateAttributableOnSet.
attributable - instance of TemplateAttributableOnSet
to use for initialization.public boolean isShowGrid()
public boolean isSnapToGrid()
public void removeAllPrimitives()
public void removePrimitive(Primitive primitive)
primitive - the instance of Primitive to remove.public void repaint()
public void selectAll()
public void setPopupMenuSource(JPopupMenuSourceWithUpdateUI popup)
popup - the new SwingPopupMenu for this document.public void setShowGrid(boolean b)
b - if true, a grid is shown, otherwise false.public void setSnapToGrid(boolean b)
b - if true, all objects are snapping to a grid when added or moved.public void togglePointMode()
public boolean isInPointMode()
true if the point mode is active on this document.public GraphPanel getGraphPanel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||