use of org.adempiere.webui.component.Tabbox 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.Tabbox in project adempiere by adempiere.
the class ADTabPanel method createHorizontalPanelForEmbedded.
private org.zkoss.zul.Row createHorizontalPanelForEmbedded(org.zkoss.zul.Div divComponent, org.zkoss.zul.Row footer, HorizontalEmbeddedPanel ep) {
//Setting Properties to Div Component
divComponent.setHeight("100%");
divComponent.setWidth("100%");
// Create a Panel Object
Panel panel = new Panel();
//Setting Properties to Panel
panel.setFramable(true);
//panel.setStyle("overflow:auto");
panel.setWidth("100%");
panel.setHeight("100%");
panel.setMaximizable(true);
//creating Object to PanelChildren class
ep.panelChildren = new Panelchildren();
// Creating a Object to Grid And Apply Properties
Grid newGrid = new Grid();
newGrid.setVflex(true);
newGrid.setStyle("margin:0; padding:0; position: absolute; border: none;");
newGrid.makeNoStrip();
newGrid.setWidth("100%");
newGrid.setHeight("100%");
// Grid append to Panel Children
ep.panelChildren.appendChild(newGrid);
// Panel Children Append to Panel
panel.appendChild(ep.panelChildren);
// Creating one Tabbox And panel append to TabPanels
Tabbox panels = setTabPanels(ep, panel);
// TabBox Append to divComponent
panels.setParent(divComponent);
ep.embeddedGrid = newGrid;
//Creating Rows based on the Grid
Rows newRows = newGrid.newRows();
newRows.setWidth("100%");
newRows.setHeight("100%");
org.zkoss.zul.Row newRow = new Group();
// Create a Row For ToolBar
org.zkoss.zul.Row toolbarRow = new org.adempiere.webui.component.Row();
toolbarRow.setSpans("5");
ep.toolbarRow = toolbarRow;
//Create a Row For All Widgets
org.zkoss.zul.Row panelRow = new org.adempiere.webui.component.Row();
panelRow.setSpans("5");
panelRow.setWidth("100%");
panelRow.setHeight("100%");
// Added to Group
newRows.appendChild(newRow);
// Added to tool-bar Row
newRows.appendChild(toolbarRow);
// Now added to Panel Row
newRows.appendChild(panelRow);
//Added to footer
newRows.appendChild(footer);
return panelRow;
}
use of org.adempiere.webui.component.Tabbox in project adempiere by adempiere.
the class MultiTabPart method doCreatePart.
protected Component doCreatePart(Component parent) {
tabbox = new Tabbox();
// tabbox.setSclass("lite");
Tabpanels tabpanels = new Tabpanels();
Tabs tabs = new Tabs();
tabbox.appendChild(tabs);
tabbox.appendChild(tabpanels);
if (parent != null)
tabbox.setParent(parent);
else
tabbox.setPage(page);
return tabbox;
}
use of org.adempiere.webui.component.Tabbox in project adempiere by adempiere.
the class WMRPDetailed method initComponents.
private void initComponents() {
OrderPlanning = new Tabbox();
PanelOrder = new Tab();
PanelFind = new Panel();
PanelCenter = new Panel();
PanelBottom = new Panel();
Results = new Tab();
Borderlayout PanelOrderLayout = new Borderlayout();
PanelOrder.appendChild(PanelOrderLayout);
North north = new North();
PanelOrderLayout.appendChild(north);
north.appendChild(PanelFind);
Center center = new Center();
PanelOrderLayout.appendChild(center);
center.appendChild(PanelCenter);
South south = new South();
PanelOrderLayout.appendChild(south);
south.appendChild(PanelBottom);
OrderPlanning.appendChild(PanelOrder);
OrderPlanning.appendChild(Results);
PanelOrder.setLabel("Order");
Results.setLabel("Result");
Center center2 = new Center();
mainLayout.appendChild(center2);
center2.appendChild(OrderPlanning);
m_frame.setWidth("99%");
m_frame.setHeight("100%");
m_frame.setStyle("position: absolute; padding: 0; margin: 0");
m_frame.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("position: absolute");
}
use of org.adempiere.webui.component.Tabbox in project adempiere by adempiere.
the class TabbedDesktop method closeWindow.
/**
*
* @param windowNo
* @return boolean
*/
public boolean closeWindow(int windowNo) {
Tabbox tabbox = windowContainer.getComponent();
Tabpanels panels = tabbox.getTabpanels();
List<?> childrens = panels.getChildren();
for (Object child : childrens) {
Tabpanel panel = (Tabpanel) child;
Component component = panel.getFirstChild();
Object att = component.getAttribute(WINDOWNO_ATTRIBUTE);
if (att != null && (att instanceof Integer)) {
if (windowNo == (Integer) att) {
Tab tab = panel.getLinkedTab();
panel.getLinkedTab().onClose();
if (tab.getParent() == null) {
unregisterWindow(windowNo);
return true;
} else {
return false;
}
}
}
}
return false;
}
Aggregations