fontAsCdna.setSelected(ap.av.isProteinFontAsCdna());
}
- if (tp != null)
+ if (isTreeFont())
{
Desktop.addInternalFrame(frame,
MessageManager.getString("action.change_font_tree_panel"),
@Override
protected void cancel_actionPerformed()
{
- if (ap != null)
+ if (isTreeFont())
+ {
+ tp.setTreeFont(oldFont);
+ }
+ else if (ap != null)
{
ap.av.setFont(oldFont, true);
ap.av.setScaleProteinAsCdna(oldProteinScale);
splitFrame.repaint();
}
}
- else if (tp != null)
- {
- tp.setTreeFont(oldFont);
- }
try
{
}
}
+ private boolean isTreeFont()
+ {
+ return tp != null;
+ }
+
/**
* DOCUMENT ME!
*/
}
return;
}
- if (tp != null)
+ if (isTreeFont())
{
tp.setTreeFont(newFont);
}
}
}
colourGroups(groups);
+
+ /*
+ * clear partition (don't show vertical line) if
+ * it is to the right of all nodes
+ */
+ if (groups.isEmpty())
+ {
+ threshold = 0f;
+ }
}
PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
Vector<SequenceNode> l = tree.findLeaves(groups.get(i));
- Vector<SequenceI> sequences = new Vector<SequenceI>();
+ Vector<SequenceI> sequences = new Vector<>();
for (int j = 0; j < l.size(); j++)
{