* layout performance improvement

* minor fix in WEditorPopupMenu
This commit is contained in:
Heng Sin Low 2008-11-22 18:04:16 +00:00
parent 6e8d9480c8
commit c18698e47c
2 changed files with 8 additions and 14 deletions

View File

@ -73,16 +73,19 @@ public class GridPanel extends Borderlayout implements EventListener
private GridTabListItemRenderer renderer;
private South south;
public GridPanel()
{
super();
listbox = new Listbox();
this(0);
}
public GridPanel(int windowNo)
{
this.windowNo = windowNo;
listbox = new Listbox();
south = new South();
this.appendChild(south);
}
public void init(GridTab gridTab)
@ -225,21 +228,11 @@ public class GridPanel extends Borderlayout implements EventListener
paging.setPageSize(pageSize);
paging.setTotalSize(tableModel.getRowCount());
paging.setDetailed(true);
South south = new South();
south.appendChild(paging);
this.appendChild(south);
paging.addEventListener(ZulEvents.ON_PAGING, this);
//workaround for layout problem
this.setVisible(false);
Clients.response(new AuEcho(this, "postRender", null));
}
}
public void postRender()
{
this.setVisible(true);
this.getParent().invalidate();
}
}
private void updateModel() {
listModel = new GridTableListModel((GridTable)tableModel, windowNo);

View File

@ -121,6 +121,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
public void addMenuListener(ContextMenuListener listener)
{
if (!menuListeners.contains(listener))
menuListeners.add(listener);
}