本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.invokeAndWait方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.invokeAndWait方法的具体用法?Java SwingTools.invokeAndWait怎么用?Java SwingTools.invokeAndWait使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.invokeAndWait方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sheetIndexUpdated
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void sheetIndexUpdated(final int newSheetIndex, final String[] sheetNames, final TableModel tableModel,
final boolean isShowingPreview, final boolean wasModelLoaded) {
updatingUI = true;
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
fireStateChanged();
updateTableModel(tableModel, isShowingPreview, wasModelLoaded, sheetNames, newSheetIndex);
}
});
updatingUI = false;
fireStateChanged();
}
示例2: headerRowIndexUpdated
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void headerRowIndexUpdated(final int newHeaderRowIndex) {
updatingUI = true;
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
boolean hasHeaderRow = newHeaderRowIndex > ResultSetAdapter.NO_HEADER_ROW;
int displayedHeaderRowIndex = hasHeaderRow ? newHeaderRowIndex + 1 : 1;
headerRowSpinner.setModel(new SpinnerNumberModel(displayedHeaderRowIndex, 1, Integer.MAX_VALUE, 1));
hasHeaderRowCheckBox.setSelected(hasHeaderRow);
killCurrentBubbleWindow(headerRowSpinner);
contentTable.revalidate();
contentTable.repaint();
}
});
updatingUI = false;
fireStateChanged();
}
示例3: DatabaseSelectionWizardStep
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public DatabaseSelectionWizardStep(final ImportWizard wizard) {
this.wizard = wizard;
SwingTools.invokeAndWait(new Runnable() {
public void run() {
DatabaseSelectionWizardStep.this.view = new DatabaseSelectionView(wizard.getDialog());
}
});
this.view.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
DatabaseSelectionWizardStep.this.fireStateChanged();
}
});
}
示例4: loadingNewTableModel
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void loadingNewTableModel() {
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
updatingUI = true;
showNotificationLabel("io.dataimport.step.excel.sheet_selection.loading_excel_sheets");
fireStateChanged();
updatingUI = false;
}
});
}
示例5: reportErrorLoadingTableModel
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void reportErrorLoadingTableModel(final Exception e) {
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
showNotificationLabel("io.dataimport.step.excel.sheet_selection.error_loading_excel_sheet",
e.getMessage());
fireStateChanged();
}
});
}
示例6: viewWillBecomeVisible
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void viewWillBecomeVisible(WizardDirection direction) throws InvalidConfigurationException {
final DataSource dataSource = wizard.getDataSource(DataSource.class);
// update view content
viewWrapper.removeAll();
if (dataSource != null) {
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
@SuppressWarnings("rawtypes")
DataSourceFactory factory = DataSourceFactoryRegistry.INSTANCE.lookUp(dataSource.getClass());
locationStep = factory.createLocationStep(wizard);
// create and add view component
JComponent viewComponent = locationStep.getView();
viewWrapper.add(viewComponent, BorderLayout.CENTER);
}
});
// register for location change events
locationStep.addChangeListener(changeListener);
locationStep.viewWillBecomeVisible(direction);
}
}
示例7: setDataSource
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public <D extends DataSource> void setDataSource(final D dataSource, final DataSourceFactory<D> factory) {
// close data source if data source was already specified
closeDataSource();
// update the data source
setDataSource(dataSource);
// log data source selection
DataImportWizardUtils.logStats(DataWizardEventType.DATASOURCE_SELECTED, factory.getI18NKey());
// add data source custom steps right after the current steps but before the concluding
// steps
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
List<WizardStep> customSteps = factory.createCustomSteps(DataImportWizard.this, dataSource);
for (WizardStep step : customSteps) {
addStep(step);
}
}
});
}
示例8: entryAdded
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void entryAdded(final Entry newEntry, Folder parent) {
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
final TreeModelEvent e = makeChangeEvent(newEntry);
for (TreeModelListener l : listeners.getListeners(TreeModelListener.class)) {
l.treeNodesInserted(e);
}
}
});
}
示例9: entryRemoved
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void entryRemoved(final Entry removedEntry, final Folder parent, final int index) {
// Save path of parent
final RepositoryTreeUtil treeUtil = new RepositoryTreeUtil();
TreePath parentPath = getPathTo(parent);
treeUtil.saveSelectionPath(parentPath);
// Fire event
final TreeModelEvent e = new TreeModelEvent(RepositoryTreeModel.this, parentPath, new int[] { index },
new Object[] { removedEntry });
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
for (TreeModelListener l : listeners.getListeners(TreeModelListener.class)) {
l.treeNodesRemoved(e);
}
}
});
// Restore path of parent
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
treeUtil.restoreSelectionPaths(parentTree);
}
});
}
示例10: entryChanged
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void entryChanged(final Entry entry) {
final TreeModelEvent e = makeChangeEvent(entry);
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
for (TreeModelListener l : listeners.getListeners(TreeModelListener.class)) {
l.treeNodesChanged(e);
}
}
});
}
示例11: folderRefreshed
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void folderRefreshed(final Folder folder) {
final TreeModelEvent e = makeChangeEvent(folder);
final RepositoryTreeUtil treeUtil = new RepositoryTreeUtil();
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
if (parentTree != null) {
treeUtil.saveExpansionState(parentTree);
}
for (TreeModelListener l : listeners.getListeners(TreeModelListener.class)) {
l.treeStructureChanged(e);
}
treeUtil.locateExpandedEntries();
}
});
if (parentTree != null) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
treeUtil.restoreExpansionState(parentTree);
}
});
}
}
示例12: refresh
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void refresh() {
for (Repository repo : root.getRepositories()) {
final TreeModelEvent e = makeChangeEvent(repo);
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
for (TreeModelListener l : listeners.getListeners(TreeModelListener.class)) {
l.treeStructureChanged(e);
}
}
});
}
}
示例13: mainFrameInitialized
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void mainFrameInitialized(MainFrame mainFrame) {
SwingTools.invokeAndWait(new Runnable() {
public void run() {
OnboardingGUIStartupListener.this.dialog = new GettingStartedDialog();
}
});
}
示例14: cellRangeSelectionUpdate
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void cellRangeSelectionUpdate(final CellRangeSelection newSelection) {
updatingUI = true;
SwingTools.invokeAndWait(new Runnable() {
@Override
public void run() {
if (newSelection == null) {
contentTable.clearSelection();
return;
}
// column indices
int columnStartIndex = Math.max(newSelection.getColumnIndexStart(), 0);
int columnEndIndex = Math.min(newSelection.getColumnIndexEnd(),
isSheetEmpty() ? 0 : contentTable.getColumnCount() - 1);
// row indices
int firstSelectedRow = newSelection.getRowIndexStart();
int lastSelectedRow = newSelection.getRowIndexEnd();
if (sheetSelectionModel.isShowingPreview()) {
// Only update the text field when showing a preview
updateCellRangeTextFields(columnStartIndex, firstSelectedRow, columnEndIndex, lastSelectedRow);
} else {
if (!isSheetEmpty()) {
contentTable.clearSelection();
int tableRowCount = isSheetEmpty() ? 0 : contentTable.getRowCount() - 1;
int lastSelectedTableRow = Math.min(newSelection.getRowIndexEnd(), tableRowCount);
// no row number means we start with first row for table selection
int firstSelectedTableRow = firstSelectedRow == XlsxCellCoordinates.NO_ROW_NUMBER ? 0
: firstSelectedRow;
// update the table selection
contentTable.setColumnSelectionInterval(columnStartIndex, columnEndIndex);
contentTable.setRowSelectionInterval(firstSelectedTableRow, lastSelectedTableRow);
// update the text field
updateCellRangeTextFields(columnStartIndex, firstSelectedRow, columnEndIndex, lastSelectedRow);
}
}
}
});
updatingUI = false;
fireStateChanged();
contentTable.revalidate();
contentTable.repaint();
}