IDEMPIERE-369 Master Detail layout improvements. Fixed bug in previous revision.

This commit is contained in:
Heng Sin Low 2012-12-27 23:25:22 +08:00
parent 679b9ca1f9
commit a1600043a9
3 changed files with 7 additions and 34 deletions

View File

@ -223,18 +223,6 @@ DataStatusListener, IADTabpanel, IdSpace
} }
} }
public Component removeDetails() {
Component details = null;
if (detailPane != null) {
if (detailPane.getParent() != null) {
details = detailPane;
detailPane.detach();
}
detailPane = null;
}
return details;
}
/** /**
* *
* @param winPanel * @param winPanel
@ -1218,7 +1206,13 @@ DataStatusListener, IADTabpanel, IdSpace
public void setDetailPaneMode(boolean detailPaneMode) { public void setDetailPaneMode(boolean detailPaneMode) {
this.detailPaneMode = detailPaneMode; this.detailPaneMode = detailPaneMode;
if (detailPaneMode) { if (detailPaneMode) {
detailPane = null; detailPane = null;
if (formContainer instanceof Borderlayout) {
Borderlayout borderLayout = (Borderlayout) formContainer;
if (borderLayout.getSouth() != null) {
borderLayout.getSouth().detach();
}
}
} }
this.setVflex("true"); this.setVflex("true");
listPanel.setDetailPaneMode(detailPaneMode); listPanel.setDetailPaneMode(detailPaneMode);

View File

@ -209,7 +209,6 @@ public class BreadCrumb extends Div implements EventListener<Event> {
@Override @Override
public void onEvent(Event event) throws Exception { public void onEvent(Event event) throws Exception {
if (linkPopup != null ) { if (linkPopup != null ) {
System.out.println(linkPopup.getPage());
if (linkPopup.getPage() != null && linkPopup.isVisible()) { if (linkPopup.getPage() != null && linkPopup.isVisible()) {
return; return;
} }

View File

@ -155,7 +155,6 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
setStyle(HEADER_GRID_STYLE); setStyle(HEADER_GRID_STYLE);
gridFooter.setStyle(HEADER_GRID_STYLE); gridFooter.setStyle(HEADER_GRID_STYLE);
setSpacing("2px");
} }
protected void createListbox() { protected void createListbox() {
@ -171,13 +170,6 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
this.detailPaneMode = detailPaneMode; this.detailPaneMode = detailPaneMode;
pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20); pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20);
updatePaging(); updatePaging();
if (detailPaneMode) {
setStyle("");
gridFooter.setStyle("");
} else {
setStyle(HEADER_GRID_STYLE);
gridFooter.setStyle(HEADER_GRID_STYLE);
}
} }
public boolean isDetailPaneMode() { public boolean isDetailPaneMode() {
@ -373,18 +365,6 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
this.getChildren().clear(); this.getChildren().clear();
} }
/**
* toggle visibility
* @param bool
*/
public void showGrid(boolean bool)
{
if (bool)
this.setVisible(true);
else
this.setVisible(false);
}
private void setupColumns() private void setupColumns()
{ {
if (init) return; if (init) return;