コード例 #1
0
 private int getProjectItemIndex() {
   EzeeProjectItem item = projectItemGrid.getSelected();
   if (item != null) {
     return projectItemGrid.getIndex(item);
   }
   return MINUS_ONE;
 }
コード例 #2
0
 private void replaceItem() {
   int index = getProjectItemIndex();
   EzeeProjectItem item = projectItemGrid.getSelected();
   if (index != MINUS_ONE && item != null) {
     projectItemGrid.getModel().getHandler().getList().remove(index);
     projectItemGrid.getModel().getHandler().getList().add(index, item);
     projectItemGrid.getGrid().redraw();
   }
 }
コード例 #3
0
 private void initGrids() {
   projectItemGrid = new EzeeProjectItemGrid(this);
   projectItems.add(projectItemGrid);
   projectItemDetailGrid = new EzeeProjectItemDetailGrid(this);
   projectItemDetails.add(projectItemDetailGrid);
   projectItemGrid.addListener(projectItemDetailGrid);
   projectPaymentGrid = new EzeeProjectPaymentGrid(this);
   projectPayments.add(projectPaymentGrid);
   projectItemGrid.addListener(projectPaymentGrid);
   if (!MGWT.getFormFactor().isDesktop()) {
     hideTotals();
   } else {
     updateTotals();
   }
 }
コード例 #4
0
 public void newProjectPayment() {
   EzeeProjectItem item = projectItemGrid.getSelected();
   if (item != null) {
     new EzeeCreateUpdateDeleteProjectItemPayment(
             cache, projectPaymentHandler, PROJECT_PAYMENT_CRUD_HEADERS)
         .show();
   }
 }
コード例 #5
0
 public void newProjectItemDetail() {
   EzeeProjectItem item = projectItemGrid.getSelected();
   if (item != null) {
     new EzeeCreateUpdateDeleteProjectItemDetail(
             cache, projectItemDetailHandler, PROJECT_ITEM_DETAIL_CRUD_HEADERS)
         .show();
   }
 }
コード例 #6
0
 public void deleteProjectItem() {
   EzeeProjectItem item = projectItemGrid.getSelected();
   if (item != null) {
     new EzeeCreateUpdateDeleteProjectItem(
             cache, projectItemHandler, item, delete, PROJECT_ITEM_CRUD_HEADERS)
         .show();
   }
 }
コード例 #7
0
 private void reloadUi() {
   int itemIndex = projectItemGrid.getIndex(projectItemGrid.getSelected());
   int detailIndex = projectItemDetailGrid.getIndex(projectItemDetailGrid.getSelected());
   int paymentIndex = projectPaymentGrid.getIndex(projectPaymentGrid.getSelected());
   projectItemGrid.reloadEntities();
   projectItemGrid.setSelected(itemIndex);
   projectItemDetailGrid.itemSelected(projectItemGrid.getSelected(), detailIndex);
   projectPaymentGrid.itemSelected(projectItemGrid.getSelected(), paymentIndex);
 }