st.setTabLevel(gTab.getTabLevel());
tabElement = st;
}
else // normal tab
{
GridController gc = new GridController(); // Timing: ca. .1 sec
CompiereColor cc = mWindow.getColor();
if (cc != null)
gc.setBackgroundColor(cc); // set color on Window level
gc.initGrid(gTab, false, m_curWindowNo, this, mWindow, (tab != 0)); // will set color on Tab level
// Timing: ca. 6-7 sec for first .2 for next
gc.addDataStatusListener(this);
gc.registerESCAction(aIgnore); // register Escape Key
// Set First Tab
if (wb == 0 && tab == 0)
{
m_curGC = gc;
Dimension size = gc.getPreferredSize(); // Screen Sizing
size.width += 4;
size.height += 4;
gc.setPreferredSize(size);
}
tabElement = gc;
// If we have a zoom query, switch to single row
if (tab == 0 && goSingleRow)
gc.switchSingleRow();
// FR [ 1757088 ]
GridField[] fields = gc.getMTab().getFields();
int m_tab_id = 0;
for(int f =0 ; f < fields.length ; f ++)
{
m_tab_id = fields[f].getIncluded_Tab_ID();
if ( m_tab_id != 0)
{
includedMap.put(m_tab_id, gc);
}
}
// Is this tab included?
if (includedMap.size() > 0)
{
GridController parent = (GridController)includedMap.get(new Integer(gTab.getAD_Tab_ID()));
if (parent != null)
{
// FR [ 1757088 ]
gc.removeDataStatusListener(this);
GridSynchronizer synchronizer = new GridSynchronizer(mWindow, parent, gc);
if (parent == m_curGC)
synchronizer.activateChild();
included = parent.includeTab(gc,this,synchronizer);
}
}
initSwitchLineAction();
} // normal tab