}
tp = new TreePanel(alignPanel, type, modelName, options);
- frameTitle = tp.getPanelTitle() + (onSelection ? " on region" : "");
+
+ frameTitle = formCalculationTitle(tp.getPanelTitle(),onSelection, viewport.getViewName(),this.title);
+
+ Desktop.addInternalFrame(tp, frameTitle, 600, 500);
+ }
+
+ /**
+ *
+ * @param panelTitle - calculation name
+ * @param onSelection - true if a selection was analysed
+ * @param viewName - null or current view name
+ * @param title - alignment frame title
+ * @return <calculation Name> (?on region) from (?viewName of) alignment name
+ */
+ private String formCalculationTitle(String panelTitle,
+ boolean onSelection, String viewName, String title)
+ {
+ String frameTitle = panelTitle;
+
+ frameTitle += (onSelection ? " on region" : "");
frameTitle += " from ";
- if (viewport.getViewName() != null)
+ if (viewName!=null)
{
frameTitle += viewport.getViewName() + " of ";
}
- frameTitle += this.title;
-
- Desktop.addInternalFrame(tp, frameTitle, 600, 500);
+ frameTitle += title;
+ return frameTitle;
}
/**