use of org.adempiere.webui.component.Tab in project adempiere by adempiere.
the class WArchiveViewer method jbInit.
/**
* Static Init
* @throws Exception
*/
private void jbInit() throws Exception {
tabbox.setWidth("100%");
tabbox.setHeight("90%");
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
tabbox.addEventListener(Events.ON_SELECT, this);
processField.setMold("select");
processField.setRows(1);
tableField.setMold("select");
tableField.setRows(1);
createdByQField.setMold("select");
createdByQField.setRows(1);
updateArchive.setImage(ServletFns.resolveThemeURL("~./images/Ok24.png"));
updateArchive.setTooltiptext(Msg.getMsg(Env.getCtx(), "Update"));
updateArchive.addEventListener(Events.ON_CLICK, this);
bRefresh.setImage(ServletFns.resolveThemeURL("~./images/Refresh24.png"));
bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
bRefresh.addEventListener(Events.ON_CLICK, this);
bBack.setImage(ServletFns.resolveThemeURL("~./images/Parent24.png"));
bBack.setTooltiptext(Msg.getMsg(Env.getCtx(), "Previous"));
bBack.addEventListener(Events.ON_CLICK, this);
bNext.setImage(ServletFns.resolveThemeURL("~./images/Detail24.png"));
bNext.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
bNext.addEventListener(Events.ON_CLICK, this);
nameField.addEventListener(Events.ON_CHANGE, this);
descriptionField.addEventListener(Events.ON_CHANGE, this);
helpField.addEventListener(Events.ON_CHANGE, this);
reportField.setLabel(Msg.translate(Env.getCtx(), "IsReport"));
reportField.addEventListener(Events.ON_CHECK, this);
Grid gridQuery = new Grid();
gridQuery.setWidth("500px");
gridQuery.setStyle("margin:0; padding:0;");
gridQuery.makeNoStrip();
gridQuery.setOddRowSclass("even");
Rows rows = new Rows();
gridQuery.appendChild(rows);
Row row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.setAlign("right");
row.appendChild(reportField);
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
Div div = new Div();
div.setAlign("right");
div.appendChild(processLabel);
row.appendChild(div);
row.appendChild(processField);
processField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(bPartnerLabel);
row.appendChild(div);
row.appendChild(bPartnerField.getComponent());
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(tableLabel);
row.appendChild(div);
row.appendChild(tableField);
tableField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(nameQLabel);
row.appendChild(div);
row.appendChild(nameQField);
nameQField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(descriptionQLabel);
row.appendChild(div);
row.appendChild(descriptionQField);
descriptionQField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(helpQLabel);
row.appendChild(div);
row.appendChild(helpQField);
helpQField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2");
div = new Div();
div.setAlign("right");
div.appendChild(createdByQLabel);
row.appendChild(div);
row.appendChild(createdByQField);
createdByQField.setWidth("100%");
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(createdQLabel);
row.appendChild(div);
row.appendChild(createdQFrom);
row.appendChild(createdQTo);
div = new Div();
div.setAlign("center");
div.appendChild(gridQuery);
Tabpanel tabQueryPanel = new Tabpanel();
tabQueryPanel.appendChild(div);
Tab tabQuery = new Tab(Msg.getMsg(Env.getCtx(), "ViewerQuery"));
tabpanels.appendChild(tabQueryPanel);
tabs.appendChild(tabQuery);
Grid gridView = new Grid();
gridView.setStyle("margin:0; padding:0;");
gridView.makeNoStrip();
gridView.setOddRowSclass("even");
rows = new Rows();
gridView.appendChild(rows);
row = new Row();
rows.appendChild(row);
row.setSpans("1, 2, 1");
div = new Div();
div.setAlign("left");
div.appendChild(bBack);
row.appendChild(div);
div = new Div();
div.setAlign("center");
div.appendChild(positionInfo);
row.appendChild(div);
div = new Div();
div.setAlign("right");
div.appendChild(bNext);
row.appendChild(div);
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(createdByLabel);
createdByLabel.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(createdByField);
createdByField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
div = new Div();
div.setAlign("right");
div.appendChild(createdField);
row.appendChild(div);
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(nameLabel);
nameLabel.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(nameField);
nameField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(descriptionLabel);
descriptionLabel.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(descriptionField);
descriptionField.setRows(3);
descriptionField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(helpLabel);
helpLabel.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
row.appendChild(helpField);
helpField.setRows(3);
helpField.setWidth("100%");
row = new Row();
rows.appendChild(row);
row.setSpans("4");
div = new Div();
div.setAlign("right");
div.appendChild(bRefresh);
div.appendChild(updateArchive);
row.appendChild(div);
createdByField.setReadonly(true);
createdField.getDatebox().setReadonly(true);
createdField.getTimebox().setReadonly(true);
Tab tabView = new Tab(Msg.getMsg(Env.getCtx(), "ViewerResult"));
Tabpanel tabViewPanel = new Tabpanel();
Hbox boxViewSeparator = new Hbox();
boxViewSeparator.setWidth("100%");
boxViewSeparator.setHeight("100%");
boxViewSeparator.setWidths("70%, 30%");
boxViewSeparator.appendChild(iframe);
boxViewSeparator.appendChild(gridView);
tabViewPanel.appendChild(boxViewSeparator);
tabs.appendChild(tabView);
tabpanels.appendChild(tabViewPanel);
confirmPanel.addActionListener(this);
updateQDisplay();
iframe.setId("reportFrame");
int height = Double.valueOf(SessionManager.getAppDesktop().getClientInfo().desktopHeight * 0.8).intValue();
height = height - 50;
iframe.setHeight(height + "px");
iframe.setWidth("100%");
iframe.setAutohide(true);
form.setWidth("100%");
form.setHeight("100%");
form.appendChild(tabbox);
form.appendChild(confirmPanel);
}
use of org.adempiere.webui.component.Tab in project adempiere by adempiere.
the class WindowContainer method closeActiveWindow.
/**
*
* @return true if successfully close the active window
*/
public boolean closeActiveWindow() {
Tab tab = (Tab) tabbox.getSelectedTab();
tabbox.getSelectedTab().onClose();
if (tab.getParent() == null)
return true;
else
return false;
}
use of org.adempiere.webui.component.Tab in project adempiere by adempiere.
the class ADTabPanel method setTabPanels.
private Tabbox setTabPanels(HorizontalEmbeddedPanel ep, Panel panel) {
// For One Tab We created only one TabBox
if (null == tabBox && null == tabPanels) {
tabBox = new Tabbox();
tabBox.setHeight("100%");
//tabBox.setStyle("height: 100%; width: 100%; position: relative;");
tabPanels = new Tabpanels();
tabPanels.setHeight("600px");
tabBox.appendChild(tabPanels);
tabs = new Tabs();
tabBox.appendChild(tabs);
}
// Setting Name For Tab
Tab tab = new Tab(ep.gridWindow.getTab(ep.tabIndex).getName());
tab.addEventListener(Events.ON_CLICK, this);
tab.addEventListener(Events.ON_FOCUS, this);
// Appending Tab to Tabs
tabs.appendChild(tab);
//Creating a TabPanel For every Tab
Tabpanel tabPanel = new Tabpanel();
embeddedTabPanel.put(ep.adTabId, tabPanel);
tabPanel.setStyle("margin:0; padding:0; border: none; height:600px;");
//Setting Embedded Panel to tabPanel
tabPanel.appendChild(panel);
//Appending Tab Panel To TabPanels
tabPanels.appendChild(tabPanel);
//By Default first Tab should populated
tabBox.setSelectedIndex(0);
// Returning the tabbox
return tabBox;
}
use of org.adempiere.webui.component.Tab in project adempiere by adempiere.
the class ADTabPanel method onEvent.
/**
* @param event
* @see EventListener#onEvent(Event)
*/
public void onEvent(Event event) {
if (event.getTarget() instanceof Tab) {
Tab tab = (Tab) event.getTarget();
for (HorizontalEmbeddedPanel embedded : horizontalIncludedPanel) {
if (embedded.gridWindow.getTab(embedded.tabIndex).getName().equals(tab.getLabel())) {
if (!getGlobalToolbar().getCurrentPanel().equals(embedded.tabPanel)) {
getGlobalToolbar().getCurrentPanel().activate(false);
getGlobalToolbar().getCurrentPanel().setUnselected(getGlobalToolbar().getCurrentPanel());
getGlobalToolbar().getCurrentPanel().setSelected(embedded.tabPanel);
embedded.tabPanel.activate(true);
if (gridTab.getAD_Tab_ID() != getGlobalToolbar().getCurrentPanel().getGridTab().getAD_Tab_ID()) {
DataStatusEvent m_DataStatusEvent = new DataStatusEvent(this, gridTab.getRowCount(), false, false, false);
windowPanel.dataStatusChanged(m_DataStatusEvent);
}
}
return;
}
}
}
if (event.getTarget() instanceof IADTabPanel) {
IADTabPanel panel = (IADTabPanel) event.getTarget();
if (panel == panel.getGlobalToolbar().getCurrentPanel())
return;
IADTabPanel last = panel.getGlobalToolbar().getCurrentPanel();
last.setUnselected(last);
last.activate(false);
panel.setSelected(panel);
panel.activate(true);
autoResize();
if (gridTab.getAD_Tab_ID() != panel.getGridTab().getAD_Tab_ID()) {
DataStatusEvent m_DataStatusEvent = new DataStatusEvent(this, gridTab.getRowCount(), false, false, false);
windowPanel.dataStatusChanged(m_DataStatusEvent);
}
} else if (event.getTarget() == listPanel.getListbox()) {
this.switchRowPresentation();
} else if (event.getTarget() == treePanel.getTree()) {
Treeitem item = treePanel.getTree().getSelectedItem();
navigateTo((SimpleTreeNode) item.getValue());
}
}
use of org.adempiere.webui.component.Tab in project adempiere by adempiere.
the class WGenForm method zkInit.
// init
/**
* Static Init.
* <pre>
* selPanel (tabbed)
* fOrg, fBPartner
* scrollPane & miniTable
* genPanel
* info
* </pre>
* @throws Exception
*/
void zkInit() throws Exception {
//
selPanel.setWidth("99%");
selPanel.setHeight("90%");
selPanel.setStyle("border: none; position: absolute");
DesktopTabpanel tabpanel = new DesktopTabpanel();
tabpanel.appendChild(selPanel);
Tabpanels tabPanels = new Tabpanels();
tabPanels.appendChild(tabpanel);
tabbedPane.appendChild(tabPanels);
Tabs tabs = new Tabs();
tabbedPane.appendChild(tabs);
Tab tab = new Tab(Msg.getMsg(Env.getCtx(), "Select"));
tabs.appendChild(tab);
North north = new North();
selPanel.appendChild(north);
north.appendChild(selNorthPanel);
South south = new South();
selPanel.appendChild(south);
south.appendChild(confirmPanelSel);
Center center = new Center();
selPanel.appendChild(center);
center.appendChild(miniTable);
center.setHflex("true");
center.setVflex("true");
miniTable.setHeight("99%");
confirmPanelSel.addActionListener(this);
//
tabpanel = new DesktopTabpanel();
tabPanels.appendChild(tabpanel);
tabpanel.appendChild(genPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "Generate"));
tabs.appendChild(tab);
genPanel.setWidth("99%");
genPanel.setHeight("90%");
genPanel.setStyle("border: none; position: absolute");
center = new Center();
genPanel.appendChild(center);
Div div = new Div();
div.appendChild(info);
center.appendChild(div);
south = new South();
genPanel.appendChild(south);
south.appendChild(confirmPanelGen);
confirmPanelGen.addActionListener(this);
}
Aggregations