示例#1
0
 @Override
 public void selectionChanged(T selectedObject, List<T> selectedObjects) {
   boolean detailVisible = detailPage != null && Frontend.isDetailShown(detailPage);
   if (detailVisible) {
     if (selectedObject != null) {
       updateDetailPage(selectedObject);
     } else {
       Frontend.hideDetail(detailPage);
     }
   }
 }
示例#2
0
 private void updateDetailPage(T selectedObject) {
   DETAIL_PAGE updatedDetailPage = updateDetailPage(detailPage, selectedObject);
   if (Frontend.isDetailShown(detailPage)) {
     if (updatedDetailPage == null || updatedDetailPage != detailPage) {
       Frontend.hideDetail(detailPage);
     }
   }
   if (updatedDetailPage != null) {
     Frontend.showDetail(TablePageWithDetail.this, updatedDetailPage);
     detailPage = updatedDetailPage;
   }
 }
示例#3
0
 @Override
 public IContent getContent() {
   table = Frontend.getInstance().createTable(keys, this);
   if (objects == null || reloadFlag) {
     objects = load();
     reloadFlag = true;
   }
   table.setObjects(objects);
   return table;
 }
示例#4
0
 @Override
 public void action(T selectedObject) {
   if (detailPage != null) {
     updateDetailPage(selectedObject);
   } else {
     detailPage = createDetailPage(selectedObject);
     if (detailPage != null) {
       Frontend.showDetail(TablePageWithDetail.this, detailPage);
     }
   }
 }