use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.
the class WTrxMaterial method dynInit.
// dynParameter
/**
* Dynamic Layout (Grid).
* Based on AD_Window: Material Transactions
*/
private void dynInit() {
super.dynInit(statusBar);
//
m_gridController = new ADTabPanel();
m_gridController.init(null, m_WindowNo, m_mTab, m_mWindow);
if (!m_gridController.isGridView())
m_gridController.switchRowPresentation();
Center center = new Center();
mainLayout.appendChild(center);
center.setFlex(true);
center.appendChild(m_gridController);
}
use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.
the class WAccountDialog method init.
/**
* Static component init.
* <pre>
* - north
* - parameterPanel
* - toolBar
* - center
* - adtabpanel
* - south
* - confirmPanel
* - statusBar
* </pre>
* @throws Exception
*/
void init() throws Exception {
//
Caption caption = new Caption(Msg.getMsg(Env.getCtx(), "Parameter"));
parameterPanel.appendChild(caption);
parameterPanel.setStyle("background-color: transparent;");
toolBar.setOrient("vertical");
toolBar.setStyle("border: none; margin: 5px");
bSave.setImage(ServletFns.resolveThemeURL("~./images/Save24.png"));
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AccountNewUpdate"));
bSave.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);
bIgnore.setImage(ServletFns.resolveThemeURL("~./images/Ignore24.png"));
bIgnore.setTooltiptext(Msg.getMsg(Env.getCtx(), "Ignore"));
bIgnore.addEventListener(Events.ON_CLICK, this);
//
toolBar.appendChild(bRefresh);
toolBar.appendChild(bIgnore);
toolBar.appendChild(bSave);
//
northPanel.appendChild(parameterPanel);
parameterPanel.setWidth("95%");
northPanel.appendChild(toolBar);
northPanel.setWidth("100%");
m_adTabPanel = new ADTabPanel();
Borderlayout layout = new Borderlayout();
layout.setParent(this);
if (AEnv.isFirefox2()) {
layout.setHeight("93%");
layout.setWidth("98%");
layout.setStyle("background-color: transparent; position: absolute;");
this.setStyle("position: relative;");
} else {
layout.setHeight("100%");
layout.setWidth("100%");
layout.setStyle("background-color: transparent;");
}
North nRegion = new North();
nRegion.setParent(layout);
nRegion.setHflex("false");
nRegion.setVflex("false");
nRegion.appendChild(northPanel);
nRegion.setStyle("background-color: transparent; border: none");
northPanel.setStyle("background-color: transparent;");
Center cRegion = new Center();
cRegion.setParent(layout);
cRegion.appendChild(m_adTabPanel);
cRegion.setHflex("true");
cRegion.setVflex("true");
South sRegion = new South();
sRegion.setParent(layout);
Div div = new Div();
div.appendChild(confirmPanel);
confirmPanel.setStyle("margin-top: 5px; margin-bottom: 5px");
div.appendChild(statusBar);
sRegion.appendChild(div);
sRegion.setStyle("background-color: transparent; border: none");
confirmPanel.addActionListener(Events.ON_CLICK, this);
this.setBorder("normal");
this.setClosable(false);
this.setAttribute("modal", Boolean.TRUE);
this.setSizable(true);
}
use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.
the class WStocktake method dynInit.
// dynParameter
/**
* Dynamic Layout (Grid).
* Based on AD_Window: Material Transactions
*/
private void dynInit() {
super.dynInit(statusBar);
//
m_gridController = new ADTabPanel();
m_gridController.init(null, m_WindowNo, m_mTab, m_mWindow);
if (!m_gridController.isGridView())
m_gridController.switchRowPresentation();
Center center = new Center();
mainLayout.appendChild(center);
center.setFlex(true);
center.appendChild(m_gridController);
}
use of org.adempiere.webui.panel.ADTabPanel in project adempiere by adempiere.
the class AbstractADTab method canNavigateTo.
public boolean canNavigateTo(int fromIndex, int toIndex) {
IADTabPanel newTab = tabPanelList.get(toIndex);
if (newTab instanceof ADTabPanel) {
if (!isDisplay(newTab)) {
return false;
}
}
boolean canJump = true;
if (toIndex != fromIndex) {
IADTabPanel oldTabpanel = fromIndex >= 0 ? tabPanelList.get(fromIndex) : null;
if (oldTabpanel != null) {
IADTabPanel oldTab = oldTabpanel;
if (newTab.getTabLevel() > oldTab.getTabLevel()) {
int currentLevel = newTab.getTabLevel();
for (int i = toIndex - 1; i >= 0; i--) {
IADTabPanel tabPanel = tabPanelList.get(i);
if (tabPanel.getTabLevel() < currentLevel) {
if (!tabPanel.isCurrent()) {
canJump = false;
break;
}
currentLevel = tabPanel.getTabLevel();
}
}
}
}
}
return canJump;
}
Aggregations