Class FragmentLayoutAlgorithm

java.lang.Object
de.saar.chorus.domgraph.layout.LayoutAlgorithm
de.saar.chorus.domgraph.layout.FragmentLayoutAlgorithm
Direct Known Subclasses:
DomGraphChartLayout, DomGraphLayout

public abstract class FragmentLayoutAlgorithm extends LayoutAlgorithm
  • Field Details

  • Constructor Details

    • FragmentLayoutAlgorithm

      public FragmentLayoutAlgorithm()
  • Method Details

    • getFragHoles

      protected List<String> getFragHoles(String frag)
      Resolving the holes of a fragment in the right order. This does not the same job as getFragLeaves, because leaves that are roots at the same time have to be excluded.
      Parameters:
      frag - the fragment to get the holes from
      Returns:
      the list of holes; an empty list if there are none.
    • getFragInEdges

      protected List<org._3pq.jgrapht.Edge> getFragInEdges(String frag)
      Compute the incoming edges of a fragment.
      Parameters:
      frag - the fragment to compute the in-edges for
      Returns:
      the sorted list of incoming edges.
    • getFragOutEdges

      protected List<org._3pq.jgrapht.Edge> getFragOutEdges(String frag)
      Compute the outgoing edges of a fragment.
      Parameters:
      frag - the fragment to compute the out-edges for
      Returns:
      the sorted list of outgoing edges.
    • getFragDegree

      protected int getFragDegree(String frag)
      Resolving the number of dominance edges adjacent to a fragment.
      Parameters:
      frag - the fragment to compute the degree for
      Returns:
      the fragment degree (considering the fragment graph)
    • getNodesToShape

      public Map<String,Shape> getNodesToShape()
      Returns:
      Returns the nodesToShape.
    • getRelXtoParent

      public Integer getRelXtoParent(String node)
    • addRelXtoParent

      public void addRelXtoParent(String node, Integer x)
    • addRelYpos

      public void addRelYpos(String node, Integer y)
    • getNodesToShape

      public Shape getNodesToShape(String node)
    • addRelXtoRoot

      public void addRelXtoRoot(String node, Integer x)
    • getRelXtoRoot

      public Map<String,Integer> getRelXtoRoot()
      Returns:
      Returns the relXtoRoot.
    • putNodeToShape

      public void putNodeToShape(String node, Shape shape)
    • initialise

      public void initialise(DomGraph graph, NodeLabels labels, Canvas canv) throws LayoutException
      Throws:
      LayoutException
    • computeFragmentPositions

      protected abstract void computeFragmentPositions()
    • computeNodePositions

      protected abstract void computeNodePositions()
    • placeNodes

      protected abstract void placeNodes()
    • drawEdges

      protected abstract void drawEdges()
    • layout

      protected void layout(DomGraph graph, NodeLabels labels, Canvas canvas) throws LayoutException
      Specified by:
      layout in class LayoutAlgorithm
      Throws:
      LayoutException