use of com.ramussoft.gui.common.UniqueView in project ramus by Vitaliy-Yakovchuk.
the class Control method setActive.
public void setActive(DFrame dockable) {
if (dockable instanceof TabFrame) {
openTab(dockable, area);
} else {
UniqueDFrame frame = (UniqueDFrame) dockable;
UniqueView view = (UniqueView) frame.getView();
if (!view.getDefaultWorkspace().equals(layout))
factory.setCurrentWorkspace(getDefaultWorkspaces(view.getDefaultWorkspace()).get(0));
UniqueViewsHolder holder = getHolder(layout);
if (holder.left instanceof JTabbedPane)
openTab(dockable, (JTabbedPane) holder.left);
if (holder.top instanceof JTabbedPane)
openTab(dockable, (JTabbedPane) holder.top);
if (holder.right instanceof JTabbedPane)
openTab(dockable, (JTabbedPane) holder.right);
if (holder.bottom instanceof JTabbedPane)
openTab(dockable, (JTabbedPane) holder.bottom);
}
dockable.requestFocus();
}
use of com.ramussoft.gui.common.UniqueView in project ramus by Vitaliy-Yakovchuk.
the class SimleGUIPluginFactory method openView.
protected boolean openView(ActionEvent actionEvent) {
for (UniqueView view : uniqueViews) {
if (actionEvent.equals(view.getOpenAction())) {
UniqueDFrame dockable = findUniqueDockable(view.getId());
control.setActive(dockable);
return true;
}
}
Enumeration<TabView> enumeration = tabDockables.keys();
while (enumeration.hasMoreElements()) {
TabView view = enumeration.nextElement();
if (actionEvent.equals(view.getOpenAction())) {
TabFrame dockable = tabDockables.get(view);
control.setActive(dockable);
return true;
}
}
return false;
}
use of com.ramussoft.gui.common.UniqueView in project ramus by Vitaliy-Yakovchuk.
the class AbstractTableView method init.
private void init(HTMLPrintable printable) {
try {
String title;
if (this instanceof UniqueView) {
title = getString(((UniqueView) this).getId());
} else if (this instanceof TabView) {
title = ((TabView) this).getTitle();
} else {
title = getQualifier().getName();
}
OutputStream os = printable.getOutputStream();
String top = "<html>\n<head>\n<title>" + title + "</title>\n</head>\n\n<body>\n";
os.write(top.getBytes());
os.write(table.getBodyText(title).getBytes());
os.write("</body>\n</html>\n".getBytes());
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations