private void fillLocalizedData() { labelStepName.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.StepName")); shell.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.PaloCellOutput")); buttonGetFields.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.GetFields")); buttonClearFields.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.ClearFields")); labelCube.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.SelectCube")); labelMeasureType.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.SelectMeasureType")); labelUpdateMode.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.UpdateMode")); labelSplashMode.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.SplashMode")); labelClearCube.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.ClearCube")); labelCommitSize.setText(BaseMessages.getString(PKG, "PaloCellOutputDialog.CommitSize")); labelPreloadDimensionCache.setText( BaseMessages.getString(PKG, "PaloCellOutputDialog.PreloadDimensionCache")); labelEnableDimensionCache.setText( BaseMessages.getString(PKG, "PaloCellOutputDialog.EnableDimensionCache")); for (PaloOption option : updateOptions) { option.setDescription( BaseMessages.getString(PKG, "PaloCellOutputDialog.UpdateOptions." + option.getCode())); } for (PaloOption option : splashOptions) { option.setDescription( BaseMessages.getString(PKG, "PaloCellOutputDialog.SplashOptions." + option.getCode())); } }
private void fillStoredData() { if (stepname != null) { textStepName.setText(stepname); } int index = addConnectionLine.indexOf( meta.getDatabaseMeta() != null ? meta.getDatabaseMeta().getName() : ""); if (index >= 0) { addConnectionLine.select(index); } if (meta.getCube() != null) { comboCube.add(meta.getCube()); comboCube.select(0); } for (PaloOption option : updateOptions) { comboUpdateMode.add(option.getDescription()); } comboUpdateMode.select( comboUpdateMode.indexOf(this.updateOptions.getDescription(meta.getUpdateMode()))); for (PaloOption option : splashOptions) { comboSplashMode.add(option.getDescription()); } comboSplashMode.select( comboSplashMode.indexOf(this.splashOptions.getDescription(meta.getSplashMode()))); textCommitSize.setText(String.valueOf(meta.getCommitSize())); buttonEnableDimensionCache.setSelection(meta.getEnableDimensionCache()); buttonPreloadDimensionCache.setSelection(meta.getPreloadDimensionCache()); buttonPreloadDimensionCache.setEnabled(buttonEnableDimensionCache.getSelection()); comboMeasureType.setItems(new String[] {"Numeric", "String"}); comboMeasureType.select(0); if (meta.getMeasureType() != null) { int indexType = comboMeasureType.indexOf(meta.getMeasureType()); if (indexType >= 0) { comboMeasureType.select(indexType); } } tableViewFields.table.removeAll(); if (meta.getFields().size() > 0) { for (DimensionField level : meta.getFields()) { tableViewFields.add(level.getDimensionName(), level.getFieldName()); } } List<String> fieldNameList = null; try { RowMetaInterface r = transMeta.getPrevStepFields(stepname); fieldNameList = Arrays.asList(r.getFieldNames()); Collections.sort(fieldNameList); } catch (Exception e) { // ignore } tableViewFields.setColumnInfo( 1, new ColumnInfo( "Field", ColumnInfo.COLUMN_TYPE_CCOMBO, (fieldNameList == null ? null : fieldNameList.toArray(new String[0])), true)); if (meta.getMeasure() != null) { final TableItem item = new TableItem(tableViewFields.table, SWT.NONE); item.setText(1, meta.getMeasure().getDimensionName()); item.setText(2, meta.getMeasure().getFieldName()); // item.setText(3,meta.getMeasure().getFieldType()); item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN)); } tableViewFields.setRowNums(); tableViewFields.optWidth(true); buttonClearCube.setSelection(meta.getClearCube()); }