Interface GraphElementComponentInterface

All Known Subinterfaces:
EdgeComponentInterface, NodeComponentInterface
All Known Implementing Classes:
AbstractGraphElementComponent, EdgeComponent, GraphElementComponent, IPKnodeComponent, NodeComponent

public interface GraphElementComponentInterface
  • Method Details

    • getAttributeComponent

      AttributeComponent getAttributeComponent​(Attribute attr)
      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

      void addAttributeComponent​(Attribute attr, GraffitiViewComponent ac)
      Adds an Attribute and its GraffitiViewComponent to the list of registered attributes that can be displayed. This attribute is then treated as dependent on the position, size etc. of this GraphElement.
      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

      void addDependentComponent​(GraphElementComponent comp)
      Adds a GraphElementComponent to the list of dependent GraphElementComponents. These will nearly always be EdgeComponents that are dependent on their source or target nodes.
      Parameters:
      comp - the GraphElementComponent that is added to the list of dependent components.
    • attributeChanged

      void attributeChanged​(Attribute attr) throws ShapeNotFoundException
      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 a GraphElementComponent from the list of dependent GraphElementComponents.
    • createNewShape

      void createNewShape​(CoordinateSystem coordSys) throws ShapeNotFoundException
      Called to initialise the shape of the NodeComponent correctly. Also calls repaint().
      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

      void graphicAttributeChanged​(Attribute attr) throws ShapeNotFoundException
      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

      void nonGraphicAttributeChanged​(Attribute attr) throws ShapeNotFoundException
      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

      void removeAttributeComponent​(Attribute attr)
      Removes a GraffitiViewComponent of an Attribute from collection of attribute components.
      Parameters:
      attr - the attribute that has to be removed
    • removeDependentComponent

      void removeDependentComponent​(GraphElementComponent comp)
      Removes a GraphElementComponent from the list of dependent GraphElementComponents.
      Parameters:
      comp - the GraphElementComponent that is removed from the list of dependent components.