Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java')
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java78
1 files changed, 39 insertions, 39 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java
index ba59030633..b0561eadeb 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/AutoScrollHelper.java
@@ -14,45 +14,45 @@ import org.eclipse.linuxtools.internal.callgraph.StapGraph;
public class AutoScrollHelper {
- public static void scrollUp(StapGraph graph) {
-
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
- int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).parent;
- if (graph.isCollapseMode()) {
- parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedParent;
- }
-
- if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
- int animMode = graph.getAnimationMode();
- graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST, parent);
- graph.setAnimationMode(animMode);
- }
- } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
- graph.shrinkTree();
- }
- }
-
- public static void scrollDown(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
- if (graph.getTopLevel() + graph.levelBuffer <
- graph.getLowestLevelOfNodesAdded()) {
- int newLevel = graph.getTopLevel() + 1;
- if (graph.levels.get(newLevel).get(0) == null) {
- return;
- }
-
- graph.setTopLevelTo(newLevel);
- int animMode = graph.getAnimationMode();
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
- graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
- graph.levels.get(newLevel).get(0));
- graph.setAnimationMode(animMode);
- }
- } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
- graph.extendTree();
- }
-
- }
+ public static void scrollUp(StapGraph graph) {
+
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).parent;
+ if (graph.isCollapseMode()) {
+ parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedParent;
+ }
+
+ if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
+ int animMode = graph.getAnimationMode();
+ graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST, parent);
+ graph.setAnimationMode(animMode);
+ }
+ } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
+ graph.shrinkTree();
+ }
+ }
+
+ public static void scrollDown(StapGraph graph) {
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ if (graph.getTopLevel() + graph.levelBuffer <
+ graph.getLowestLevelOfNodesAdded()) {
+ int newLevel = graph.getTopLevel() + 1;
+ if (graph.levels.get(newLevel).get(0) == null) {
+ return;
+ }
+
+ graph.setTopLevelTo(newLevel);
+ int animMode = graph.getAnimationMode();
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+ graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
+ graph.levels.get(newLevel).get(0));
+ graph.setAnimationMode(animMode);
+ }
+ } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
+ graph.extendTree();
+ }
+
+ }
}

Back to the top