import java.util.List;
import java.util.Vector;
-public class TreeCanvas extends Panel implements MouseListener,
- MouseMotionListener
+public class TreeCanvas extends Panel
+ implements MouseListener, MouseMotionListener
{
TreeModel tree;
g.drawString(nodeLabel, xstart + 2, ypos - 2);
}
- String name = (markPlaceholders && node.isPlaceholder()) ? (PLACEHOLDER + node
- .getName()) : node.getName();
+ String name = (markPlaceholders && node.isPlaceholder())
+ ? (PLACEHOLDER + node.getName())
+ : node.getName();
FontMetrics fm = g.getFontMetrics(font);
int charWidth = fm.stringWidth(name) + 3;
int charHeight = fm.getHeight();
g.fillRect(xend - 2, ypos - 2, 4, 4);
}
- int ystart = (int) (node.left() == null ? 0 : (((SequenceNode) node
- .left()).ycount * chunk))
- + offy;
- int yend = (int) (node.right() == null ? 0 : (((SequenceNode) node
- .right()).ycount * chunk)) + offy;
+ int ystart = (int) (node.left() == null ? 0
+ : (((SequenceNode) node.left()).ycount * chunk)) + offy;
+ int yend = (int) (node.right() == null ? 0
+ : (((SequenceNode) node.right()).ycount * chunk)) + offy;
Rectangle pos = new Rectangle(xend - 2, ypos - 2, 5, 5);
nodeHash.put(node, pos);
g.setColor(Color.gray);
}
- int x = (int) (threshold * (getSize().width - labelLength - 2 * offx) + offx);
+ int x = (int) (threshold * (getSize().width - labelLength - 2 * offx)
+ + offx);
g.drawLine(x, 0, x, getSize().height);
}
}
else
{
- cs = ColourSchemeProperty.getColourScheme(sg,
- ColourSchemeProperty.getColourName(av
- .getGlobalColourScheme()));
+ cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
+ .getColourName(av.getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
// if (cs != null)