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);
}