protected void onGrdTrackingAreaColumGridCheckBoxClicked(int column, grdTrackingAreaColumRow row, boolean isChecked) throws PresentationLogicException { if (!form.getLocalContext().getSelectedRowIsNotNull()) { form.getLocalContext().setSelectedRow(new ColumnDetailVo()); } form.getLocalContext().getSelectedRow().setColumn((TrackingAreaColumn) row.getValue()); if (form.getGlobalContext().Emergency.getAreaColumn() == null) { form.getGlobalContext().Emergency.setAreaColumn(new ColumnDetailVo()); } if (isChecked) { form.getLocalContext().setSelectedEvent(TrackingAreaColumnConfigEvent.AREACOLUMNGRIDCHECKED); getColumnDetails(); engine.open(form.getForms().Emergency.ColumnConfigDialog); } else { form.getLocalContext().setSelectedEvent(null); form.grdTrackingAreaColum().setValue(row.getValue()); if (form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth() != null) { usedSpace = usedSpace - form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } resetColumnConfig(); } }
@Override protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { boolean wasSelected = false; if (form.grdTrackingAreaColum().getSelectedRow() != null) { wasSelected = form.grdTrackingAreaColum().getSelectedRow().getcolSelect(); } if (form.getLocalContext().getSelectedRowIsNotNull()) { form.grdTrackingAreaColum().setValue(form.getLocalContext().getSelectedRow().getColumn()); } if (formName.equals(form.getForms().Emergency.ColumnConfigDialog) && result.equals(DialogResult.OK)) { ColumnDetailVo column = form.getGlobalContext().Emergency.getAreaColumn(); if (column != null && form.getGlobalContext().Emergency.getAreaColumn().getIsChecked()) { form.grdTrackingAreaColum().getSelectedRow().setcolSelect(column.getIsChecked()); form.grdTrackingAreaColum().getSelectedRow().setcolMaskInPublicArea(column.getMaskInPublicArea()!=null ? column.getMaskInPublicArea() : false);//WDEV-17966 form.grdTrackingAreaColum().getSelectedRow().setcolColumnHeader(column.getColHeader()); form.grdTrackingAreaColum().getSelectedRow().setcolColumnWidth(column.getColWidth()); form.grdTrackingAreaColum().getSelectedRow().setcolImage(column.getColumn().getImage()); if (column.getColWidth() != null) { if (column.getIsChecked()) { usedSpace = usedSpace + form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } else if (wasSelected && !form.grdTrackingAreaColum().getSelectedRow().getcolSelect()) { usedSpace = usedSpace - form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } } } else { resetColumnConfig(); } } //WDEV-14896 else if (formName.equals(form.getForms().Emergency.CopyAreaWorkspaceConfig) && DialogResult.OK.equals(result)) { repopulateGridWithNewValues(form.getGlobalContext().Emergency.getTrackingAreaColumns()); form.getLocalContext().setCopyAction(Boolean.TRUE); //wdev-17595 } else if (!formName.equals(form.getForms().Emergency.TrackingAreaColumnPreview)) { if (form.getLocalContext().getSelectedEventIsNotNull() && form.getLocalContext().getSelectedEvent().equals(TrackingAreaColumnConfigEvent.AREACOLUMNGRIDCHECKED)) { form.grdTrackingAreaColum().getSelectedRow().setcolSelect(false); } if (form.grdTrackingAreaColum().getSelectedRow() != null && form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth() != null) { usedSpace = usedSpace + form.grdTrackingAreaColum().getSelectedRow().getcolColumnWidth(); } } updateContextMenuState(); }