Search in sources :

Example 11 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class DefaultDesktop method doCreatePart.

protected Component doCreatePart(Component parent) {
    SidePanel pnlSide = new SidePanel();
    HeaderPanel pnlHead = new HeaderPanel();
    pnlSide.getMenuPanel().addMenuListener(this);
    layout = new Borderlayout();
    if (parent != null) {
        layout.setParent(parent);
        layout.setWidth("100%");
        layout.setHeight("100%");
        layout.setStyle("position: absolute");
    } else
        layout.setPage(page);
    dashboardRunnable = new DashboardRunnable(layout.getDesktop(), this);
    North n = new North();
    n.setSplittable(true);
    n.setCollapsible(false);
    layout.appendChild(n);
    pnlHead.setParent(n);
    West w = new West();
    layout.appendChild(w);
    w.setWidth("300px");
    w.setCollapsible(true);
    w.setSplittable(true);
    w.setTitle(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Menu")));
    w.setFlex(true);
    w.addEventListener(Events.ON_OPEN, new EventListener() {

        @Override
        public void onEvent(Event event) throws Exception {
            OpenEvent oe = (OpenEvent) event;
            UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
            pref.setProperty(UserPreference.P_MENU_COLLAPSED, !oe.isOpen());
            pref.savePreference();
        }
    });
    UserPreference pref = SessionManager.getSessionApplication().getUserPreference();
    boolean menuCollapsed = pref.isPropertyBool(UserPreference.P_MENU_COLLAPSED);
    w.setOpen(!menuCollapsed);
    pnlSide.setParent(w);
    windowArea = new Center();
    windowArea.setParent(layout);
    windowArea.setFlex(true);
    windowContainer.createPart(windowArea);
    createHomeTab();
    return layout;
}
Also used : Center(org.zkoss.zkex.zul.Center) SidePanel(org.adempiere.webui.panel.SidePanel) West(org.zkoss.zkex.zul.West) Borderlayout(org.zkoss.zkex.zul.Borderlayout) DashboardRunnable(org.adempiere.webui.dashboard.DashboardRunnable) IOException(java.io.IOException) HeaderPanel(org.adempiere.webui.panel.HeaderPanel) Event(org.zkoss.zk.ui.event.Event) OpenEvent(org.zkoss.zk.ui.event.OpenEvent) North(org.zkoss.zkex.zul.North) UserPreference(org.adempiere.webui.util.UserPreference) EventListener(org.zkoss.zk.ui.event.EventListener) OpenEvent(org.zkoss.zk.ui.event.OpenEvent)

Example 12 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WCreateFromPanel method zkInit.

/**
	 * Create UI
	 * @throws IOException 
	 */
protected void zkInit() throws IOException {
    Borderlayout contentPane = new Borderlayout();
    appendChild(contentPane);
    North north = new North();
    contentPane.appendChild(north);
    north.appendChild(parameterPanel);
    Center center = new Center();
    contentPane.appendChild(center);
    center.appendChild(dataTable);
    WAppsAction selectAllAction = new WAppsAction(SELECT_ALL, null, null);
    Button selectAllButton = selectAllAction.getButton();
    confirmPanel.addComponentsLeft(selectAllButton);
    selectAllButton.addActionListener(this);
    South south = new South();
    contentPane.appendChild(south);
    Panel southPanel = new Panel();
    south.appendChild(southPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(confirmPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(statusBar);
    setWidth("750px");
    setHeight("550px");
    contentPane.setWidth("100%");
    contentPane.setHeight("100%");
}
Also used : ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) StatusBarPanel(org.adempiere.webui.panel.StatusBarPanel) Panel(org.adempiere.webui.component.Panel) Center(org.zkoss.zkex.zul.Center) Button(org.adempiere.webui.component.Button) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout) WAppsAction(org.adempiere.webui.component.WAppsAction) Separator(org.zkoss.zul.Separator)

Example 13 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WDeleteSelection method initComponents.

/**
	 * Init components
	 */
private void initComponents() {
    container = new Window();
    container.setTitle(Msg.getMsg(Env.getCtx(), "DeleteSelection"));
    container.setAttribute("modal", Boolean.TRUE);
    container.setWidth("500px");
    container.setHeight("400px");
    container.setBorder("normal");
    container.setSizable(true);
    container.setClosable(true);
    container.setMaximizable(true);
    //	Init list
    listbox = new Listbox();
    // FR [ 2877111 ]
    Vector<String> data = getData();
    for (int i = 0; i < data.size(); i++) {
        String record = data.get(i);
        listbox.appendItem(record, record);
    }
    //	Is a multiple selection
    listbox.setMultiple(true);
    //	Instance Panel
    confirmPanel = new ConfirmPanel(true);
    //	
    Div div = new Div();
    div.setStyle("width: 100%; height: 100%");
    Pre pre = new Pre();
    Text text = new Text(Msg.getMsg(Env.getCtx(), "DeleteSelectionDescription"));
    text.setParent(pre);
    pre.setParent(div);
    //
    Borderlayout layout = new Borderlayout();
    layout.setParent(container);
    layout.setWidth("100%");
    layout.setHeight("100%");
    North north = new North();
    north.setParent(layout);
    north.appendChild(div);
    Center center = new Center();
    center.setParent(layout);
    center.setFlex(true);
    center.appendChild(listbox);
    listbox.setWidth("100%");
    listbox.setVflex(true);
    //
    South south = new South();
    south.setParent(layout);
    south.appendChild(confirmPanel);
    //	Add Listener
    confirmPanel.addActionListener(Events.ON_CLICK, this);
    //	Default Selected
    if (isDefaultSelected() && getSelection() != null) {
        listbox.setSelectedIndices(getSelection());
    }
}
Also used : Window(org.adempiere.webui.component.Window) Pre(org.zkoss.zhtml.Pre) Center(org.zkoss.zkex.zul.Center) South(org.zkoss.zkex.zul.South) Text(org.zkoss.zhtml.Text) Borderlayout(org.zkoss.zkex.zul.Borderlayout) Div(org.zkoss.zul.Div) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) North(org.zkoss.zkex.zul.North) Listbox(org.adempiere.webui.component.Listbox)

Example 14 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WRecordInfo method init.

/**
	 * 	Static Layout
	 *	@throws Exception
	 */
private void init() throws Exception {
    Div div = new Div();
    div.setStyle("width: 100%; height: 100%");
    Pre pre = new Pre();
    Text text = new Text(getInfo());
    text.setParent(pre);
    pre.setParent(div);
    //
    Borderlayout layout = new Borderlayout();
    layout.setParent(v_Container);
    layout.setWidth("100%");
    layout.setHeight("100%");
    Center center = new Center();
    center.setParent(layout);
    center.setFlex(true);
    if (isOk()) {
        North north = new North();
        north.setParent(layout);
        north.appendChild(div);
        center.appendChild(table);
        table.setWidth("100%");
        table.setVflex(true);
    } else {
        center.appendChild(div);
    }
    //
    South south = new South();
    south.setParent(layout);
    south.appendChild(confirmPanel);
    confirmPanel.addActionListener(Events.ON_CLICK, this);
}
Also used : Div(org.zkoss.zul.Div) Pre(org.zkoss.zhtml.Pre) Center(org.zkoss.zkex.zul.Center) South(org.zkoss.zkex.zul.South) Text(org.zkoss.zhtml.Text) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout)

Example 15 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WScanBarUI method productPanel.

/**
     * Creates the account panel.
     *
     * The account panel contains:
     * <li>a table detailing all accounts
     * <li>a button for creating charges for selected accounts
     */
private void productPanel() {
    Borderlayout borderlayout = new Borderlayout();
    borderlayout.setStyle("position: absolute");
    borderlayout.setWidth("100%");
    borderlayout.setHeight("100%");
    productPanel.appendChild(borderlayout);
    North north = new North();
    north.setBorder("none");
    borderlayout.appendChild(north);
    Label label = new Label(Msg.translate(Env.getCtx(), "M_Product_ID"));
    label.setStyle("font-weight: bold;");
    north.appendChild(label);
    Center center = new Center();
    center.setBorder("none");
    center.setFlex(true);
    center.setAutoscroll(true);
    borderlayout.appendChild(center);
    center.appendChild(productTable);
    South south = new South();
    south.setBorder("none");
    borderlayout.appendChild(south);
    Panel southPanel = new Panel();
    southPanel.setAlign("right");
    south.appendChild(southPanel);
    return;
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zkex.zul.Center) Label(org.adempiere.webui.component.Label) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout)

Aggregations

Borderlayout (org.zkoss.zkex.zul.Borderlayout)16 Center (org.zkoss.zkex.zul.Center)13 North (org.zkoss.zkex.zul.North)11 South (org.zkoss.zkex.zul.South)10 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)8 Panel (org.adempiere.webui.component.Panel)7 Separator (org.zkoss.zul.Separator)4 PropertyVetoException (java.beans.PropertyVetoException)3 Button (org.adempiere.webui.component.Button)3 Label (org.adempiere.webui.component.Label)3 WAppsAction (org.adempiere.webui.component.WAppsAction)3 West (org.zkoss.zkex.zul.West)3 org.zkoss.zul (org.zkoss.zul)3 Row (org.zkoss.zul.Row)3 IOException (java.io.IOException)2 Listbox (org.adempiere.webui.component.Listbox)2 ToolBarButton (org.adempiere.webui.component.ToolBarButton)2 Pre (org.zkoss.zhtml.Pre)2 Text (org.zkoss.zhtml.Text)2 Div (org.zkoss.zul.Div)2