* layout performance improvement
* minor fix in WEditorPopupMenu
This commit is contained in:
parent
6e8d9480c8
commit
c18698e47c
|
@ -72,17 +72,20 @@ public class GridPanel extends Borderlayout implements EventListener
|
||||||
private Paging paging;
|
private Paging paging;
|
||||||
|
|
||||||
private GridTabListItemRenderer renderer;
|
private GridTabListItemRenderer renderer;
|
||||||
|
|
||||||
|
private South south;
|
||||||
|
|
||||||
public GridPanel()
|
public GridPanel()
|
||||||
{
|
{
|
||||||
super();
|
this(0);
|
||||||
listbox = new Listbox();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GridPanel(int windowNo)
|
public GridPanel(int windowNo)
|
||||||
{
|
{
|
||||||
this.windowNo = windowNo;
|
this.windowNo = windowNo;
|
||||||
listbox = new Listbox();
|
listbox = new Listbox();
|
||||||
|
south = new South();
|
||||||
|
this.appendChild(south);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(GridTab gridTab)
|
public void init(GridTab gridTab)
|
||||||
|
@ -225,22 +228,12 @@ public class GridPanel extends Borderlayout implements EventListener
|
||||||
paging.setPageSize(pageSize);
|
paging.setPageSize(pageSize);
|
||||||
paging.setTotalSize(tableModel.getRowCount());
|
paging.setTotalSize(tableModel.getRowCount());
|
||||||
paging.setDetailed(true);
|
paging.setDetailed(true);
|
||||||
South south = new South();
|
|
||||||
south.appendChild(paging);
|
south.appendChild(paging);
|
||||||
this.appendChild(south);
|
|
||||||
paging.addEventListener(ZulEvents.ON_PAGING, this);
|
paging.addEventListener(ZulEvents.ON_PAGING, this);
|
||||||
//workaround for layout problem
|
this.getParent().invalidate();
|
||||||
this.setVisible(false);
|
|
||||||
Clients.response(new AuEcho(this, "postRender", null));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postRender()
|
|
||||||
{
|
|
||||||
this.setVisible(true);
|
|
||||||
this.getParent().invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateModel() {
|
private void updateModel() {
|
||||||
listModel = new GridTableListModel((GridTable)tableModel, windowNo);
|
listModel = new GridTableListModel((GridTable)tableModel, windowNo);
|
||||||
listModel.setPageSize(pageSize);
|
listModel.setPageSize(pageSize);
|
||||||
|
|
|
@ -121,7 +121,8 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
|
||||||
|
|
||||||
public void addMenuListener(ContextMenuListener listener)
|
public void addMenuListener(ContextMenuListener listener)
|
||||||
{
|
{
|
||||||
menuListeners.add(listener);
|
if (!menuListeners.contains(listener))
|
||||||
|
menuListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent(Event event)
|
public void onEvent(Event event)
|
||||||
|
|
Loading…
Reference in New Issue