protected void setComboBoxes() { shell.getDisplay().syncExec( new Runnable() { public void run() { if ( inputFields != null ) { String[] fieldNames = inputFields.getFieldNames(); wParent.setItems( fieldNames ); wChild.setItems( fieldNames ); } } } ); }
protected void setComboBoxes() { // Something was changed in the row. // final Map<String, Integer> fields = new HashMap<String, Integer>(); // Add the currentMeta fields... fields.putAll( inputFields ); shell.getDisplay().syncExec( new Runnable() { public void run() { Set<String> keySet = fields.keySet(); List<String> entries = new ArrayList<String>( keySet ); String[] fieldNames = entries.toArray( new String[entries.size()] ); Const.sortStrings( fieldNames ); ciKey[0].setComboValues( fieldNames ); } } ); }
@Override public void run() { shell.getDisplay().syncExec( new Runnable() { @Override public void run() {
public boolean threadMessageBox( final String message, final String text, boolean allowCancel, int type ) { final boolean[] result = new boolean[1]; Display.getDefault().syncExec( new Runnable() { public void run() { result[0] = SpoonFactory.getInstance().messageBox( message, text, true, Const.INFO ); } } ); return result[0]; }
private void update() { Display.getDefault().syncExec( new Runnable() { @Override public void run() { connectionBox.removeItems(); for ( String key : keys ) { connectionBox.addItem( key ); } } } ); } } );
protected void setComboBoxes() { // Something was changed in the row. // final Map<String, Integer> fields = new HashMap<String, Integer>(); // Add the currentMeta fields... fields.putAll( inputFields ); shell.getDisplay().syncExec( new Runnable() { public void run() { // Add the newly create fields. // /* * int nrNonEmptyFields = wFields.nrNonEmpty(); for (int i=0;i<nrNonEmptyFields;i++) { TableItem item = * wFields.getNonEmpty(i); fields.put(item.getText(1), new Integer(1000000+i)); // The number is just to debug * the origin of the fieldname } */ Set<String> keySet = fields.keySet(); List<String> entries = new ArrayList<String>( keySet ); String[] fieldNames = entries.toArray( new String[entries.size()] ); Const.sortStrings( fieldNames ); colinf[5].setComboValues( fieldNames ); } } ); }
protected void setComboBoxes() { // Something was changed in the row. // final Map<String, Integer> fields = new HashMap<String, Integer>(); // Add the currentMeta fields... fields.putAll( inputFields ); shell.getDisplay().syncExec( new Runnable() { public void run() { // Add the newly create fields. // /* * int nrNonEmptyFields = wFields.nrNonEmpty(); for (int i=0;i<nrNonEmptyFields;i++) { TableItem item = * wFields.getNonEmpty(i); fields.put(item.getText(1), new Integer(1000000+i)); // The number is just to debug * the origin of the fieldname } */ Set<String> keySet = fields.keySet(); List<String> entries = new ArrayList<String>( keySet ); String[] fieldNames = entries.toArray( new String[entries.size()] ); Const.sortStrings( fieldNames ); colinf[5].setComboValues( fieldNames ); } } ); }
protected void setComboBoxes() { // Something was changed in the row. // final Map<String, Integer> fields = new HashMap<String, Integer>(); // Add the currentMeta fields... fields.putAll( inputFields ); shell.getDisplay().syncExec( new Runnable() { @Override public void run() { // Add the newly create fields. // /* * int nrNonEmptyFields = wFields.nrNonEmpty(); for (int i=0;i<nrNonEmptyFields;i++) { TableItem item = * wFields.getNonEmpty(i); fields.put(item.getText(1), new Integer(1000000+i)); // The number is just to debug * the origin of the fieldname } */ Set<String> keySet = fields.keySet(); List<String> entries = new ArrayList<String>( keySet ); String[] fieldNames = entries.toArray( new String[entries.size()] ); Const.sortStrings( fieldNames ); colinf[5].setComboValues( fieldNames ); FormulaDialog.this.fieldNames = fieldNames; } } ); }
display.syncExec( new Runnable() {
@Override public void run() { // do gui stuff here spoon.getDisplay().syncExec( new Runnable() { @Override public void run() { setQueryInProgress( true ); JobHistoryLogTab model = models[index]; model.setLogTable( jobMeta.getLogTables().get( index ) ); } } ); final boolean moreRows = getHistoryData( index, fetchMode ); // do gui stuff here spoon.getDisplay().syncExec( new Runnable() { @Override public void run() { displayHistoryData( index ); setQueryInProgress( false ); setMoreRows( moreRows ); } } ); } } ).start();
@Override public void run() { // do gui stuff here spoon.getDisplay().syncExec( new Runnable() { @Override public void run() { setQueryInProgress( true ); TransHistoryLogTab model = models[index]; model.setLogTable( transMeta.getLogTables().get( index ) ); } } ); final boolean moreRows = getHistoryData( index, fetchMode ); // do gui stuff here spoon.getDisplay().syncExec( new Runnable() { @Override public void run() { displayHistoryData( index ); setQueryInProgress( false ); setMoreRows( moreRows ); } } ); } } ).start();
protected void doInEventThread( final Runnable r ) { if ( Display.getCurrent() != null ) { r.run(); } else { Display.getDefault().syncExec( r ); } }
Display.getDefault().syncExec( new Runnable() {
shell.getDisplay().syncExec( new Runnable() {
display.syncExec( new Runnable() {
protected void setComboBoxes() { // Something was changed in the row. // final Map<String, Integer> fields = new HashMap<String, Integer>(); // Add the currentMeta fields... fields.putAll( inputFields ); shell.getDisplay().syncExec( new Runnable() { @Override public void run() { // Add the newly create fields. // int nrNonEmptyFields = wFields.nrNonEmpty(); for ( int i = 0; i < nrNonEmptyFields; i++ ) { TableItem item = wFields.getNonEmpty( i ); fields.put( item.getText( 1 ), Integer.valueOf( 1000000 + i ) ); // The number is just to debug the origin of // the fieldname } } } ); Set<String> keySet = fields.keySet(); List<String> entries = new ArrayList<String>( keySet ); String[] fieldNames = entries.toArray( new String[entries.size()] ); Const.sortStrings( fieldNames ); colinf[2].setComboValues( fieldNames ); colinf[3].setComboValues( fieldNames ); colinf[4].setComboValues( fieldNames ); }
public void fireMenuControlers() { if ( !Display.getDefault().getThread().equals( Thread.currentThread() ) ) { display.syncExec( new Runnable() { @Override public void run() { fireMenuControlers(); } } ); return; } org.pentaho.ui.xul.dom.Document doc; if ( mainSpoonContainer != null ) { doc = mainSpoonContainer.getDocumentRoot(); for ( ISpoonMenuController menuController : menuControllers ) { menuController.updateMenu( doc ); } } }
protected void onAuthorization( AuthorizationCodeRequestUrl authorizationUrl ) throws IOException { String url = authorizationUrl.build(); Spoon spoon = Spoon.getInstance(); if ( spoon != null ) { Display.getDefault().syncExec( new Runnable() { public void run() { Shell shell = spoon.getShell(); GoogleAuthorizationDialog authorizationDialog = new GoogleAuthorizationDialog( shell, getReceiver() ); authorizationDialog.open( url ); } } ); } else { browse( url ); } } }
if ( transInfo.hasMissingPlugins() ) { StepMeta stepMeta = transInfo.getStep( 0 ); Display.getDefault().syncExec( () -> { MissingTransDialog missingTransDialog = new MissingTransDialog( shell, transInfo.getMissingTrans(), stepMeta.getStepMetaInterface(), transInfo,