use of org.adempiere.webui.component.Tabpanel in project adempiere by adempiere.
the class TabbedDesktop method closeActiveWindow.
/**
* Close active tab
* @return boolean
*/
public boolean closeActiveWindow() {
if (windowContainer.getSelectedTab() != null) {
Tabpanel panel = (Tabpanel) windowContainer.getSelectedTab().getLinkedPanel();
Component component = panel.getFirstChild();
Object att = component.getAttribute(WINDOWNO_ATTRIBUTE);
if (windowContainer.closeActiveWindow()) {
if (att != null && (att instanceof Integer)) {
unregisterWindow((Integer) att);
}
return true;
} else {
return false;
}
}
return false;
}
use of org.adempiere.webui.component.Tabpanel in project adempiere by adempiere.
the class TabbedDesktop method showEmbedded.
/**
*
* @param window
*/
protected void showEmbedded(Window window) {
Tabpanel tabPanel = new Tabpanel();
window.setParent(tabPanel);
String title = window.getTitle();
window.setTitle(null);
preOpenNewTab();
if (Window.INSERT_NEXT.equals(window.getAttribute(Window.INSERT_POSITION_KEY)))
windowContainer.insertAfter(windowContainer.getSelectedTab(), tabPanel, title, true, true);
else
windowContainer.addWindow(tabPanel, title, true);
}
use of org.adempiere.webui.component.Tabpanel in project adempiere by adempiere.
the class AboutWindow method init.
private void init() {
this.setWidth("500px");
this.setHeight("450px");
this.setPosition("center");
this.setTitle(ThemeManager.getBrowserTitle());
this.setClosable(true);
this.setSizable(true);
this.addEventListener(Events.ON_SIZE, this);
Vbox layout = new Vbox();
layout.setWidth("100%");
layout.setParent(this);
tabbox = new Tabbox();
tabbox.setParent(layout);
tabbox.setWidth("480px");
tabbox.setHeight("380px");
// tabbox.setSclass("lite");
Tabs tabs = new Tabs();
tabs.setParent(tabbox);
tabPanels = new Tabpanels();
tabPanels.setParent(tabbox);
tabPanels.setWidth("480px");
//about
Tab tab = new Tab();
tab.setLabel(Msg.getMsg(Env.getCtx(), "About"));
tab.setParent(tabs);
Tabpanel tabPanel = createAbout();
tabPanel.setParent(tabPanels);
//Credit
tab = new Tab();
tab.setLabel(Msg.getMsg(Env.getCtx(), "Credits"));
tab.setParent(tabs);
tabPanel = createCredit();
tabPanel.setParent(tabPanels);
//Info
tab = new Tab();
tab.setLabel(Msg.getMsg(Env.getCtx(), "Info"));
tab.setParent(tabs);
tabPanel = createInfo();
tabPanel.setParent(tabPanels);
//Trace
tab = new Tab();
tab.setLabel("Errors");
tabLog = tab;
tab.setParent(tabs);
tabPanel = createTrace();
tabPanel.setParent(tabPanels);
Hbox hbox = new Hbox();
hbox.setParent(layout);
hbox.setPack("end");
hbox.setWidth("100%");
Button btnOk = new Button();
btnOk.setImage("/images/Ok24.png");
btnOk.addEventListener(Events.ON_CLICK, this);
btnOk.setParent(hbox);
this.setBorder("normal");
}
use of org.adempiere.webui.component.Tabpanel in project adempiere by adempiere.
the class AboutWindow method createInfo.
private Tabpanel createInfo() {
Tabpanel tabPanel = new Tabpanel();
Div div = new Div();
div.setParent(tabPanel);
div.setHeight("100%");
div.setStyle("overflow: auto;");
Pre pre = new Pre();
pre.setParent(div);
Text text = new Text(CLogMgt.getInfo(null).toString());
text.setParent(pre);
return tabPanel;
}
use of org.adempiere.webui.component.Tabpanel in project adempiere by adempiere.
the class AboutWindow method createTrace.
private Tabpanel createTrace() {
Tabpanel tabPanel = new Tabpanel();
Vbox vbox = new Vbox();
vbox.setParent(tabPanel);
vbox.setWidth("100%");
vbox.setHeight("100%");
Hbox hbox = new Hbox();
bErrorsOnly = new Checkbox();
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
//default only show error
bErrorsOnly.setChecked(true);
bErrorsOnly.addEventListener(Events.ON_CHECK, this);
hbox.appendChild(bErrorsOnly);
btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
btnDownload.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnDownload);
btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnErrorEmail);
vbox.appendChild(hbox);
Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
logTable = new Listbox();
ListHead listHead = new ListHead();
listHead.setParent(logTable);
listHead.setSizable(true);
for (Object obj : columnNames) {
ListHeader header = new ListHeader(obj.toString());
header.setWidth("100px");
listHead.appendChild(header);
}
vbox.appendChild(logTable);
logTable.setWidth("480px");
logTable.setHeight("310px");
logTable.setVflex(false);
updateLogTable();
return tabPanel;
}
Aggregations