当前位置: 首页>>代码示例>>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;未经允许,请勿转载。