Package org.graffiti.plugin.view
Interface GraphElementComponentInterface
- All Known Subinterfaces:
EdgeComponentInterface
,NodeComponentInterface
- All Known Implementing Classes:
AbstractGraphElementComponent
,EdgeComponent
,GraphElementComponent
,IPKnodeComponent
,NodeComponent
public interface GraphElementComponentInterface
-
Method Summary
Modifier and Type Method Description void
addAttributeComponent(Attribute attr, GraffitiViewComponent ac)
Adds anAttribute
and itsGraffitiViewComponent
to the list of registered attributes that can be displayed.void
addDependentComponent(GraphElementComponent comp)
Adds aGraphElementComponent
to the list of dependentGraphElementComponent
s.void
attributeChanged(Attribute attr)
Called when an attribute of the GraphElement represented by this component has changed.void
clearAttributeComponentList()
Removes all entries in the attributeComponent list.void
clearDependentComponentList()
Removes aGraphElementComponent
from the list of dependentGraphElementComponent
s.void
createNewShape(CoordinateSystem coordSys)
Called to initialise the shape of the NodeComponent correctly.void
createStandardShape()
Called to initialise and draw a standard shape, if the specified shapeclass could not be found.AttributeComponent
getAttributeComponent(Attribute attr)
Returns the attributeComponents of given attribute.Iterator<?>
getAttributeComponentIterator()
Returns the attributeComponents of given attribute.Collection<?>
getAttributeComponents()
GraphElement
getGraphElement()
Returns the graphElement.GraphElementShape
getShape()
Returns GraphElementShape objectvoid
graphicAttributeChanged(Attribute attr)
Called when a graphic attribute of the GraphElement represented by this component has changed.void
nonGraphicAttributeChanged(Attribute attr)
Called when a non-graphic attribute of the GraphElement represented by this component has changed.void
removeAttributeComponent(Attribute attr)
Removes aGraffitiViewComponent
of anAttribute
from collection of attribute components.void
removeDependentComponent(GraphElementComponent comp)
Removes aGraphElementComponent
from the list of dependentGraphElementComponent
s.
-
Method Details
-
getAttributeComponent
Returns the attributeComponents of given attribute.- Parameters:
attr
-- Returns:
- Map
-
getAttributeComponentIterator
Iterator<?> getAttributeComponentIterator()Returns the attributeComponents of given attribute.- Returns:
- Map
-
getAttributeComponents
Collection<?> getAttributeComponents() -
getGraphElement
GraphElement getGraphElement()Returns the graphElement.- Returns:
- GraphElement
-
getShape
GraphElementShape getShape()Returns GraphElementShape object- Returns:
- DOCUMENT ME!
-
addAttributeComponent
Adds anAttribute
and itsGraffitiViewComponent
to the list of registered attributes that can be displayed. This attribute is then treated as dependent on the position, size etc. of thisGraphElement
.- Parameters:
attr
- the attribute that is registered as being able to be displayed.ac
- the component that will be used to display the attribute.
-
addDependentComponent
Adds aGraphElementComponent
to the list of dependentGraphElementComponent
s. These will nearly always beEdgeComponent
s that are dependent on their source or target nodes.- Parameters:
comp
- theGraphElementComponent
that is added to the list of dependent components.
-
attributeChanged
Called when an attribute of the GraphElement represented by this component has changed.- Parameters:
attr
- the attribute that has triggered the event.- Throws:
ShapeNotFoundException
- DOCUMENT ME!
-
clearAttributeComponentList
void clearAttributeComponentList()Removes all entries in the attributeComponent list. -
clearDependentComponentList
void clearDependentComponentList()Removes aGraphElementComponent
from the list of dependentGraphElementComponent
s. -
createNewShape
Called to initialise the shape of the NodeComponent correctly. Also callsrepaint()
.- Parameters:
coordSys
- TODO- Throws:
ShapeNotFoundException
- thrown when the shapeclass couldn't be resolved.
-
createStandardShape
void createStandardShape()Called to initialise and draw a standard shape, if the specified shapeclass could not be found. -
graphicAttributeChanged
Called when a graphic attribute of the GraphElement represented by this component has changed.- Parameters:
attr
- the graphic attribute that has triggered the event.- Throws:
ShapeNotFoundException
- DOCUMENT ME!
-
nonGraphicAttributeChanged
Called when a non-graphic attribute of the GraphElement represented by this component has changed.- Parameters:
attr
- the attribute that has triggered the event.- Throws:
ShapeNotFoundException
- DOCUMENT ME!
-
removeAttributeComponent
Removes aGraffitiViewComponent
of anAttribute
from collection of attribute components.- Parameters:
attr
- the attribute that has to be removed
-
removeDependentComponent
Removes aGraphElementComponent
from the list of dependentGraphElementComponent
s.- Parameters:
comp
- theGraphElementComponent
that is removed from the list of dependent components.
-