當前位置: 首頁>>代碼示例>>Java>>正文


Java SwingTools.invokeLater方法代碼示例

本文整理匯總了Java中com.rapidminer.gui.tools.SwingTools.invokeLater方法的典型用法代碼示例。如果您正苦於以下問題:Java SwingTools.invokeLater方法的具體用法?Java SwingTools.invokeLater怎麽用?Java SwingTools.invokeLater使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.rapidminer.gui.tools.SwingTools的用法示例。


在下文中一共展示了SwingTools.invokeLater方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateErrorTable

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Updates the content of the errorTable and the label that is used to show it.
 */
private void updateErrorTable() {
	errorTableModel.setErrors(configuration.getErrors());

	// make the first row smaller
	collapsibleErrorTable.getTable().getColumnModel().getColumn(0).setMaxWidth(150);
	collapsibleErrorTable.getTable().getColumnModel().getColumn(0).setPreferredWidth(100);

	// make the last row wider
	collapsibleErrorTable.getTable().getColumnModel().getColumn(3).setMaxWidth(800);
	collapsibleErrorTable.getTable().getColumnModel().getColumn(3).setPreferredWidth(400);

	SwingTools.invokeLater(new Runnable() {

		@Override
		public void run() {
			collapsibleErrorTable.update();
		}
	});
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:23,代碼來源:CSVFormatSpecificationPanel.java

示例2: showCard

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Shows the card specified by id, e.g. {@link #CARD_ID_CHOOSER} or {@link #CARD_ID_PROGRESS}.
 *
 * @param cardId
 *            the id of the card
 */
private void showCard(final String cardId) {
	SwingTools.invokeLater(new Runnable() {

		@Override
		public void run() {
			((CardLayout) mainPanel.getLayout()).show(mainPanel, cardId);
		}
	});
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:16,代碼來源:AbstractToRepositoryStep.java

示例3: updateDateFormat

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Updates date format for the date and reloads it.
 *
 * @param format
 *            the new date format
 */
private void updateDateFormat(SimpleDateFormat format) {
	DataImportWizardUtils.logStats(DataWizardEventType.DATE_FORMAT_CHANGED, format.toPattern());
	dataSetMetaData.setDateFormat(format);
	ProgressThread rereadThread = new ProgressThread("io.dataimport.step.data_column_configuration.update_date_format") {

		@Override
		public void run() {
			try {
				tableModel.reread(getProgressListener());
			} catch (final DataSetException e) {
				SwingTools.invokeLater(new Runnable() {

					@Override
					public void run() {
						showErrorNotification("io.dataimport.step.data_column_configuration.error_loading_data",
								e.getMessage());
					}
				});
				return;
			}
			SwingTools.invokeLater(new Runnable() {

				@Override
				public void run() {
					validator.setParsingErrors(tableModel.getParsingErrors());
					tableModel.fireTableDataChanged();
				}
			});

		}
	};

	rereadThread.start();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:41,代碼來源:ConfigureDataView.java

示例4: updateButtons

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Updates the button status within the EDT by calling {@link SwingTools#invokeLater(Runnable)}.
 */
private void updateButtons() {
	SwingTools.invokeLater(new Runnable() {

		@Override
		public void run() {
			// adapt previous button
			WizardStep currentStep = getCurrentStep();
			if (currentStep == null) {
				return;
			}

			previousButton.setIcon(previousIcon);
			previousButton.setEnabled(
					currentStep.getPreviousButtonState() == ButtonState.ENABLED && !previousStepIDs.isEmpty());
			previousButton.setVisible(currentStep.getPreviousButtonState() != ButtonState.HIDDEN);

			// adapt next and finish buttons
			nextButton.setIcon(nextIcon);
			nextButton.setEnabled(currentStep.getNextButtonState() == ButtonState.ENABLED);
			boolean isLastStep = isLastStep(currentStep);
			nextButton.setVisible(!isLastStep && currentStep.getNextButtonState() != ButtonState.HIDDEN);

			finishButton.setEnabled(currentStep.getNextButtonState() == ButtonState.ENABLED);
			finishButton.setVisible(isLastStep && currentStep.getNextButtonState() != ButtonState.HIDDEN);

			cancelButton.setEnabled(true);
		}

	});
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:34,代碼來源:DataImportWizard.java

示例5: disableButtons

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
private void disableButtons() {
	SwingTools.invokeLater(new Runnable() {

		@Override
		public void run() {
			previousButton.setEnabled(false);
			nextButton.setEnabled(false);
			finishButton.setEnabled(false);
			cancelButton.setEnabled(false);
		}

	});
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:14,代碼來源:DataImportWizard.java

示例6: enableActions

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Enables and disables all actions according to the current state (process running, operator
 * selected...
 */
public void enableActions() {
	synchronized (process) {
		SwingTools.invokeLater(new Runnable() {

			@Override
			public void run() {
				enableActionsNow();
			}
		});
	}
	updateCheckboxStates();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:Actions.java

示例7: validateRemote

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
private boolean validateRemote(ExecutionUnit unit, String mode) {
  ValidationResult response = remote.validate(unit, mode);
  boolean runnable = true;
  for(OpMetaResult result : response.metas()) {
    Operator op = findOp(unit, result.op());
    if (op == null) {
      logger.warning("operator " + result.op() + " not found");
      continue;
    }

    if (result.error() != null) {
      int code = 1000; // this code is map to the code in UserErrorMessages.properties
      final UserError e = new UserError(op, code, result.error());
      SwingTools.invokeLater(new Runnable() {
        @Override
        public void run() {
          ProcessGUITools.displayBubbleForUserError(e);
        }
      });
      runnable = false;
    } else {
      // add meta info to operator
      scala.collection.immutable.Map<String, PortMetaResult> ports = result.ports();

      op.getInputPorts().clear(Port.CLEAR_META_DATA_ERRORS);
      op.getOutputPorts().clear(Port.CLEAR_META_DATA_ERRORS);
      for (OutputPort out : op.getOutputPorts().getAllPorts()) {
        if (ports.contains(out.getName())) {
          MetaData meta = convertMeta(ports.get(out.getName()).get().schema());
          out.deliverMD(meta);
        }
      }
    }
  }

  unit.transformMetaData();
  return runnable;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:39,代碼來源:MidasUnitExecutor.java

示例8: changeType

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Updates the column type to the newType. Rereads the column and updates the error table.
 *
 * @param newType
 *            the new column type
 */
private void changeType(final ColumnType newType) {
	DataImportWizardUtils.logStats(DataWizardEventType.COLUMN_TYPE_CHANGED,
			metaData.getColumnMetaData(columnIndex).getType() + "->" + newType);
	metaData.getColumnMetaData(columnIndex).setType(newType);
	final ConfigureDataTableModel tableModel = (ConfigureDataTableModel) ConfigureDataTableHeader.this.table.getModel();
	ProgressThread columnThread = new ProgressThread("io.dataimport.step.data_column_configuration.update_column") {

		@Override
		public void run() {
			try {
				tableModel.rereadColumn(columnIndex, getProgressListener());
			} catch (final DataSetException e) {
				SwingTools.invokeLater(new Runnable() {

					@Override
					public void run() {
						configureDataView.showErrorNotification(
								"io.dataimport.step.data_column_configuration.error_loading_data", e.getMessage());
					}
				});
				return;
			}
			SwingTools.invokeLater(new Runnable() {

				@Override
				public void run() {
					validator.setParsingErrors(tableModel.getParsingErrors());

					ConfigureDataTableHeader.this
							.setToolTipText(createTooltip(metaData.getColumnMetaData(columnIndex).getName(),
									DataImportWizardUtils.getNameForColumnType(newType),
									metaData.getColumnMetaData(columnIndex).getRole()));
					ConfigureDataTableHeader.this.typeLabel.setText(DataImportWizardUtils.getNameForColumnType(newType));
					ConfigureDataTableHeader.this.table.repaint();
					ConfigureDataTableHeader.this.table.getTableHeader().repaint();
				}
			});

		}
	};
	columnThread.start();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:49,代碼來源:ConfigureDataTableHeader.java

示例9: showStep

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
/**
 * Updates the dialog button, title, header and shows the {@link ImportWizardStep} referenced by
 * the provided stepId.
 */
void showStep(final String stepId, WizardDirection direction) {

	// log step change
	switch (direction) {
		case NEXT:
			DataImportWizardUtils.logStats(DataWizardEventType.NEXT_STEP, stepId);
			break;
		case PREVIOUS:
			DataImportWizardUtils.logStats(DataWizardEventType.PREVIOUS_STEP, stepId);
			break;
		case STARTING:
			DataImportWizardUtils.logStats(DataWizardEventType.STARTING, stepId);
			break;
		default:
			// ignore
			break;

	}

	// lookup step
	WizardStep importWizardStep = getStep(stepId);

	// and notify the step that it will become visible now
	try {
		importWizardStep.viewWillBecomeVisible(direction);
	} catch (InvalidConfigurationException e) {
		return;
	}

	// update current and previous step ID
	if (currentStepID != null && direction != WizardDirection.PREVIOUS) {
		this.previousStepIDs.add(currentStepID);
	}
	this.currentStepID = stepId;

	updateButtons();
	updateTitle();
	updateInfoHeader();

	SwingTools.invokeLater(new Runnable() {

		@Override
		public void run() {
			// show step
			cardLayout.show(cardPanel, stepId);
		}
	});

}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:54,代碼來源:DataImportWizard.java


注:本文中的com.rapidminer.gui.tools.SwingTools.invokeLater方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。