* Fixed some UI bugs related to the recently added collapsed grid feature.
This commit is contained in:
parent
da3979ec51
commit
549ef12574
|
@ -684,13 +684,13 @@ public final class APanel extends CPanel
|
|||
gc.initGrid(gTab, false, m_curWindowNo, this, mWindow, false); // will set color on Tab level
|
||||
included = parent.includeTab(gc,this);
|
||||
TabSwitcher ts = new TabSwitcher(parent, this);
|
||||
Component[] comp = parent.getvPanel().getComponents();
|
||||
Component[] comp = parent.getvPanel().getComponentsRecursive();
|
||||
for (int i = 0; i < comp.length; i++)
|
||||
{
|
||||
ts.addTabSwitchingSupport((JComponent)comp[i]);
|
||||
}
|
||||
ts = new TabSwitcher(gc, this);
|
||||
comp = gc.getvPanel().getComponents();
|
||||
comp = gc.getvPanel().getComponentsRecursive();
|
||||
for (int i = 0; i < comp.length; i++)
|
||||
{
|
||||
ts.addTabSwitchingSupport((JComponent)comp[i]);
|
||||
|
|
|
@ -226,7 +226,7 @@ public class GridController extends CPanel
|
|||
m_mTab.removePropertyChangeListener(vTable);
|
||||
|
||||
// editors
|
||||
Component[] comp = vPanel.getComponents();
|
||||
Component[] comp = vPanel.getComponentsRecursive();
|
||||
for (int i = 0; i < comp.length; i++)
|
||||
{
|
||||
if (comp[i] instanceof VEditor)
|
||||
|
@ -881,7 +881,7 @@ public class GridController extends CPanel
|
|||
// No Dependents and no Callout - Set just Background
|
||||
if (dependants.size() == 0 && changedField.getCallout().length() > 0)
|
||||
{
|
||||
Component[] comp = vPanel.getComponents();
|
||||
Component[] comp = vPanel.getComponentsRecursive();
|
||||
for (int i = 0; i < comp.length; i++)
|
||||
{
|
||||
if (columnName.equals(comp[i].getName ()) && comp[i] instanceof VEditor)
|
||||
|
@ -904,7 +904,7 @@ public class GridController extends CPanel
|
|||
boolean noData = m_mTab.getRowCount() == 0;
|
||||
log.config(m_mTab.toString() + " - Rows=" + m_mTab.getRowCount());
|
||||
// All Components in vPanel (Single Row)
|
||||
Component[] comps = vPanel.getComponents();
|
||||
Component[] comps = vPanel.getComponentsRecursive();
|
||||
for (int i = 0; i < comps.length; i++)
|
||||
{
|
||||
Component comp = comps[i];
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.awt.event.*;
|
|||
import javax.swing.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
//
|
||||
import org.adempiere.plaf.AdempierePLAF;
|
||||
import org.compiere.grid.ed.*;
|
||||
|
@ -635,22 +636,12 @@ public final class VPanel extends CTabbedPane
|
|||
return (org.jdesktop.swingx.JXTaskPane)m_tabincludelist.get(AD_Tab_ID);
|
||||
}
|
||||
|
||||
//[ 1757088 ]
|
||||
public Component[] getComponents()
|
||||
private void findChildComponents(CPanel container, List list)
|
||||
{
|
||||
java.util.ArrayList list = new java.util.ArrayList();
|
||||
|
||||
for (int i = 0; i < this.getTabCount(); i++)
|
||||
{
|
||||
list.add(this.getComponentAt(i));
|
||||
if (this.getComponentAt(i) instanceof CPanel)
|
||||
{
|
||||
CPanel tab = (CPanel)this.getComponentAt(i);
|
||||
Component[] comp = tab.getComponents();
|
||||
|
||||
Component[] comp = container.getComponents();
|
||||
for (int c = 0; c < comp.length; c++)
|
||||
{
|
||||
|
||||
list.add(comp[c]);
|
||||
if ( comp [c] instanceof org.jdesktop.swingx.JXTaskPaneContainer)
|
||||
{
|
||||
org.jdesktop.swingx.JXTaskPaneContainer panetaskcontainer = (org.jdesktop.swingx.JXTaskPaneContainer)comp [c];
|
||||
|
@ -671,10 +662,26 @@ public final class VPanel extends CTabbedPane
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (comp[c] instanceof CPanel)
|
||||
{
|
||||
|
||||
findChildComponents((CPanel)comp[c], list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.add(comp[c]);
|
||||
}
|
||||
//[ 1757088 ]
|
||||
public Component[] getComponentsRecursive()
|
||||
{
|
||||
java.util.ArrayList list = new java.util.ArrayList();
|
||||
|
||||
for (int i = 0; i < this.getTabCount(); i++)
|
||||
{
|
||||
list.add(this.getComponentAt(i));
|
||||
if (this.getComponentAt(i) instanceof CPanel)
|
||||
{
|
||||
CPanel panel = (CPanel)this.getComponentAt(i);
|
||||
findChildComponents(panel, list);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue