Search in sources :

Example 16 with TreeDrawerNode

use of edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeDrawerNode in project clusterMaker2 by RBVI.

the class ATRView method selectParent.

private void selectParent() {
    TreeDrawerNode current = selectedNode;
    selectedNode = current.getParent();
    if (selectedNode == null) {
        selectedNode = current;
        return;
    }
    if (current == selectedNode.getLeft())
        current = selectedNode.getRight();
    else
        current = selectedNode.getLeft();
    drawer.paintSubtree(offscreenGraphics, xScaleEq, yScaleEq, destRect, current, true);
    drawer.paintSingle(offscreenGraphics, xScaleEq, yScaleEq, destRect, selectedNode, true);
    synchMap();
    repaint();
}
Also used : TreeDrawerNode(edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeDrawerNode)

Example 17 with TreeDrawerNode

use of edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeDrawerNode in project clusterMaker2 by RBVI.

the class ATRView method selectRight.

private void selectRight() {
    if (selectedNode.isLeaf()) {
        return;
    }
    TreeDrawerNode current = selectedNode;
    selectedNode = current.getRight();
    drawer.paintSingle(offscreenGraphics, xScaleEq, yScaleEq, destRect, current, false);
    drawer.paintSubtree(offscreenGraphics, xScaleEq, yScaleEq, destRect, current.getLeft(), false);
    synchMap();
    repaint();
}
Also used : TreeDrawerNode(edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeDrawerNode)

Aggregations

TreeDrawerNode (edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeDrawerNode)17 AtrTVModel (edu.ucsf.rbvi.clusterMaker2.internal.treeview.model.AtrTVModel)2 TVModel (edu.ucsf.rbvi.clusterMaker2.internal.treeview.model.TVModel)2 HeaderInfo (edu.ucsf.rbvi.clusterMaker2.internal.treeview.HeaderInfo)1 TreeSelectionI (edu.ucsf.rbvi.clusterMaker2.internal.treeview.TreeSelectionI)1 Observable (java.util.Observable)1