comboElementType.select( 0 ); if ( meta.getElementType() != null ) { int indexType = comboElementType.indexOf( meta.getElementType() ); if ( indexType >= 0 ) { comboElementType.select( indexType );
comboUpdateMode.add( option.getDescription() ); comboUpdateMode.select( comboUpdateMode.indexOf( this.updateOptions.getDescription( meta.getUpdateMode() ) ) ); comboSplashMode.select( comboSplashMode.indexOf( this.splashOptions.getDescription( meta.getSplashMode() ) ) ); comboMeasureType.select( 0 ); if ( meta.getMeasureType() != null ) { int indexType = comboMeasureType.indexOf( meta.getMeasureType() ); if ( indexType >= 0 ) { comboMeasureType.select( indexType );
private void doSelectConnection( boolean clearCurrentData ) { try { if ( clearCurrentData ) { tableViewFields.table.removeAll(); comboDimension.removeAll(); } if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); if ( dbMeta != null ) { PaloDimInputData data = new PaloDimInputData( dbMeta ); data.helper.connect(); List<String> dimensions = data.helper.getDimensionsNames(); Collections.sort( dimensions, new PaloNameComparator() ); for ( String dimensionName : dimensions ) { if ( comboDimension.indexOf( dimensionName ) == -1 ) { comboDimension.add( dimensionName ); } } data.helper.disconnect(); } } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PaloDimInputDialog.RetreiveDimensionsErrorTitle" ), BaseMessages.getString( PKG, "PaloDimInputDialog.RetreiveDimensionsError" ), ex ); } }
private void doSelectConnection( boolean clearCurrentData ) { try { if ( clearCurrentData ) { tableViewFields.table.removeAll(); comboDimension.removeAll(); } if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); if ( dbMeta != null ) { PaloDimOutputData data = new PaloDimOutputData( dbMeta ); data.helper.connect(); List<String> dimensions = data.helper.getDimensionsNames(); Collections.sort( dimensions, new PaloNameComparator() ); for ( String dimensionName : dimensions ) { if ( comboDimension.indexOf( dimensionName ) == -1 ) { comboDimension.add( dimensionName ); } } data.helper.disconnect(); } } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PaloDimOutputDialog.RetreiveDimensionsErrorTitle" ), BaseMessages.getString( PKG, "PaloDimOutputDialog.RetreiveDimensionsError" ), ex ); } }
private void doSelectConnection( boolean clearCurrentData ) { try { if ( clearCurrentData ) { tableViewFields.table.removeAll(); comboCube.removeAll(); } if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); if ( dbMeta != null ) { PaloCellInputData data = new PaloCellInputData( dbMeta ); data.helper.connect(); List<String> cubes = data.helper.getCubesNames(); Collections.sort( cubes, new PaloNameComparator() ); for ( String cubeName : cubes ) { if ( comboCube.indexOf( cubeName ) == -1 ) { comboCube.add( cubeName ); } } data.helper.disconnect(); } } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PaloCellInputDialog.RetreiveCubesErrorTitle" ), BaseMessages.getString( PKG, "PaloCellInputDialog.RetreiveCubesError" ), ex ); } }
private void doSelectConnection( boolean clearCurrentData ) { try { if ( clearCurrentData ) { tableViewFields.table.removeAll(); comboCube.removeAll(); } if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); if ( dbMeta != null ) { PaloCellOutputData data = new PaloCellOutputData( dbMeta ); data.helper.connect(); List<String> cubes = data.helper.getCubesNames(); Collections.sort( cubes, new PaloNameComparator() ); for ( String cubeName : cubes ) { if ( comboCube.indexOf( cubeName ) == -1 ) { comboCube.add( cubeName ); } } data.helper.disconnect(); } } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PaloCellOutputDialog.RetreiveCubesErrorTitle" ), BaseMessages.getString( PKG, "PaloCellOutputDialog.RetreiveCubesError" ), ex ); } }
if ( meta.getCubeMeasure() != null ) { if ( meta.getCubeMeasure().getFieldType() != null ) { int indexType = comboMeasureType.indexOf( meta.getCubeMeasure().getFieldType() ); if ( indexType >= 0 ) { comboMeasureType.select( indexType );
private int getLayoutDirectionIndex(int layoutDirection) { int index; if (layoutDirection == SWT.LEFT_TO_RIGHT) { index = layoutDirectionCombo.indexOf(LTR_DIR); } else if (layoutDirection == SWT.RIGHT_TO_LEFT) { index = layoutDirectionCombo.indexOf(RTL_DIR); } else { index = layoutDirectionCombo.indexOf(DEFAULT_DIR); } return index; }
public int indexOf(String item) { if (combo instanceof Combo) return ((Combo) combo).indexOf(item); return ((CCombo) combo).indexOf(item); }
private int getPriorityFromDialog() { int priority = IMarker.PRIORITY_NORMAL; if (priorityCombo.getSelectionIndex() == priorityCombo .indexOf(PRIORITY_HIGH)) { priority = IMarker.PRIORITY_HIGH; } else if (priorityCombo.getSelectionIndex() == priorityCombo .indexOf(PRIORITY_LOW)) { priority = IMarker.PRIORITY_LOW; } return priority; }
/** * <code>setEncoding</code> Set the selection in the combo to the * descriptive encoding name. * * @param enc * a <code>string</code> value. Note this is not the IANA * tag. */ public void setEncoding(String enc) { encodingCombo.setText(enc); encodingCombo.select(encodingCombo.indexOf(enc)); }
/** * @return index of selected element */ public int getSelectedIndex() { int selectionIndex = combo.getSelectionIndex(); if (selectionIndex == -1) selectionIndex = combo.indexOf(combo.getText()); return selectionIndex; }
protected void initializeTargetCombo() { IConfigurationElement[] elements = PDECore.getDefault().getTargetProfileManager().getSortedTargets(); fTargetIds = new String[elements.length]; for (int i = 0; i < elements.length; i++) { String name = elements[i].getAttribute("name"); //$NON-NLS-1$ if (fTargets.indexOf(name) == -1) fTargets.add(name); fTargetIds[i] = elements[i].getAttribute("id"); //$NON-NLS-1$ } if (elements.length > 0) fTargets.select(0); }
private void selectLastUsedUri() { String lastUri = settings.get(lastUriKey); if (lastUri != null) { int i = uriCombo.indexOf(lastUri); if (i != -1) { uriCombo.select(i); return; } } uriCombo.select(0); }
private void selectLastUsedUri() { String lastUri = settings.get(lastUriKey); if (lastUri != null) { int i = uriCombo.indexOf(lastUri); if (i != -1) { uriCombo.select(i); return; } } uriCombo.select(0); }
void scaleY() { try { yscale = Float.parseFloat(scaleYCombo.getText()); } catch (NumberFormatException e) { yscale = 1; scaleYCombo.select(scaleYCombo.indexOf("1")); } if (image != null) { resizeScrollBars(); imageCanvas.redraw(); } }
protected void initializeCombo(IDialogSettings settings, String key, Combo combo) { for (int i = 0; i < 6; i++) { String curr = settings.get(key + String.valueOf(i)); if (curr != null && combo.indexOf(curr) == -1) { combo.add(curr); } } if (combo.getItemCount() > 0) combo.setText(combo.getItem(0)); }
protected void initializeCombo(IDialogSettings settings, String key, Combo combo) { for (int i = 0; i < 6; i++) { String curr = settings.get(key + String.valueOf(i)); if (curr != null && combo.indexOf(curr) == -1) { combo.add(curr); } } if (combo.getItemCount() > 0) combo.setText(combo.getItem(0)); }