Search in sources :

Example 11 with Tabpanel

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;
}
Also used : Component(org.zkoss.zk.ui.Component) Tabpanel(org.adempiere.webui.component.Tabpanel) DesktopTabpanel(org.adempiere.webui.component.DesktopTabpanel)

Example 12 with Tabpanel

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);
}
Also used : Tabpanel(org.adempiere.webui.component.Tabpanel) DesktopTabpanel(org.adempiere.webui.component.DesktopTabpanel)

Example 13 with Tabpanel

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");
}
Also used : Hbox(org.zkoss.zul.Hbox) Tab(org.adempiere.webui.component.Tab) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabbox(org.adempiere.webui.component.Tabbox) Vbox(org.zkoss.zul.Vbox) Tabpanel(org.adempiere.webui.component.Tabpanel)

Example 14 with Tabpanel

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;
}
Also used : Div(org.zkoss.zul.Div) Pre(org.zkoss.zhtml.Pre) Text(org.zkoss.zhtml.Text) Tabpanel(org.adempiere.webui.component.Tabpanel)

Example 15 with 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;
}
Also used : Hbox(org.zkoss.zul.Hbox) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Checkbox(org.adempiere.webui.component.Checkbox) ListHead(org.adempiere.webui.component.ListHead) ListHeader(org.adempiere.webui.component.ListHeader) Listbox(org.adempiere.webui.component.Listbox) Tabpanel(org.adempiere.webui.component.Tabpanel) Vbox(org.zkoss.zul.Vbox)

Aggregations

Tabpanel (org.adempiere.webui.component.Tabpanel)23 Tab (org.adempiere.webui.component.Tab)10 ToolBarButton (org.adempiere.webui.component.ToolBarButton)7 Vbox (org.zkoss.zul.Vbox)7 Tabpanels (org.adempiere.webui.component.Tabpanels)6 Tabs (org.adempiere.webui.component.Tabs)6 Component (org.zkoss.zk.ui.Component)6 Div (org.zkoss.zul.Div)6 Tabbox (org.adempiere.webui.component.Tabbox)5 Hbox (org.zkoss.zul.Hbox)5 IOException (java.io.IOException)4 DesktopTabpanel (org.adempiere.webui.component.DesktopTabpanel)4 Row (org.adempiere.webui.component.Row)4 Rows (org.adempiere.webui.component.Rows)4 Event (org.zkoss.zk.ui.event.Event)4 Html (org.zkoss.zul.Html)4 BufferedReader (java.io.BufferedReader)3 InputStreamReader (java.io.InputStreamReader)3 URL (java.net.URL)3 PreparedStatement (java.sql.PreparedStatement)3