Search in sources :

Example 1 with VerticalBox

use of org.adempiere.webui.component.VerticalBox in project adempiere by adempiere.

the class WAlertDialog method init.

private void init() {
    setBorder("normal");
    VerticalBox vbox = new VerticalBox();
    appendChild(vbox);
    Div div = new Div();
    div.setHeight("500px");
    div.setWidth("700px");
    div.setStyle("overflow: auto; border: 1px solid");
    vbox.appendChild(div);
    Html html = new Html();
    div.appendChild(html);
    html.setContent(text);
    vbox.appendChild(new Separator());
    ConfirmPanel confirmPanel = new ConfirmPanel(false);
    vbox.appendChild(confirmPanel);
    confirmPanel.addActionListener(this);
}
Also used : Div(org.zkoss.zul.Div) VerticalBox(org.adempiere.webui.component.VerticalBox) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Html(org.zkoss.zul.Html) Separator(org.zkoss.zul.Separator)

Example 2 with VerticalBox

use of org.adempiere.webui.component.VerticalBox in project adempiere by adempiere.

the class WTextEditorDialog method init.

private void init() {
    setBorder("normal");
    VerticalBox vbox = new VerticalBox();
    appendChild(vbox);
    tabbox = new Tabbox();
    vbox.appendChild(tabbox);
    Tabs tabs = new Tabs();
    tabbox.appendChild(tabs);
    Tabpanels tabPanels = new Tabpanels();
    tabbox.appendChild(tabPanels);
    Tab tab = new Tab("Text");
    tabs.appendChild(tab);
    Tabpanel tabPanel = new Tabpanel();
    tabPanels.appendChild(tabPanel);
    textBox = new Textbox(text);
    textBox.setCols(80);
    textBox.setRows(30);
    textBox.setEnabled(editable);
    textBox.setWidth("700px");
    textBox.setHeight("500px");
    tabPanel.appendChild(textBox);
    tab = new Tab("HTML");
    tabs.appendChild(tab);
    tabPanel = new Tabpanel();
    tabPanels.appendChild(tabPanel);
    if (editable) {
        editor = new FCKeditor();
        tabPanel.appendChild(editor);
        editor.setWidth("700px");
        editor.setHeight("500px");
        editor.setValue(text);
    } else {
        Div div = new Div();
        div.setHeight("500px");
        div.setWidth("700px");
        div.setStyle("overflow: auto; border: 1px solid");
        tabPanel.appendChild(div);
        Html html = new Html();
        div.appendChild(html);
        html.setContent(text);
    }
    vbox.appendChild(new Separator());
    ConfirmPanel confirmPanel = new ConfirmPanel(true);
    vbox.appendChild(confirmPanel);
    confirmPanel.addButton(confirmPanel.createButton(ConfirmPanel.A_RESET));
    confirmPanel.addActionListener(this);
    if (maxSize > 0) {
        status = new Label();
        appendChild(status);
        updateStatus(text.length());
        status.setStyle("margin-top:10px;");
        textBox.addEventListener(Events.ON_CHANGE, this);
        editor.addEventListener(Events.ON_CHANGE, this);
    }
    tabbox.addEventListener(Events.ON_SELECT, this);
}
Also used : VerticalBox(org.adempiere.webui.component.VerticalBox) Textbox(org.adempiere.webui.component.Textbox) Label(org.adempiere.webui.component.Label) Html(org.zkoss.zul.Html) Tabbox(org.adempiere.webui.component.Tabbox) Div(org.zkoss.zul.Div) Tab(org.adempiere.webui.component.Tab) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Tabpanels(org.adempiere.webui.component.Tabpanels) Tabs(org.adempiere.webui.component.Tabs) Tabpanel(org.adempiere.webui.component.Tabpanel) Separator(org.zkoss.zul.Separator) FCKeditor(org.zkforge.fckez.FCKeditor)

Aggregations

ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)2 VerticalBox (org.adempiere.webui.component.VerticalBox)2 Div (org.zkoss.zul.Div)2 Html (org.zkoss.zul.Html)2 Separator (org.zkoss.zul.Separator)2 Label (org.adempiere.webui.component.Label)1 Tab (org.adempiere.webui.component.Tab)1 Tabbox (org.adempiere.webui.component.Tabbox)1 Tabpanel (org.adempiere.webui.component.Tabpanel)1 Tabpanels (org.adempiere.webui.component.Tabpanels)1 Tabs (org.adempiere.webui.component.Tabs)1 Textbox (org.adempiere.webui.component.Textbox)1 FCKeditor (org.zkforge.fckez.FCKeditor)1