List of usage examples for java.awt Window setCursor
public void setCursor(Cursor cursor)
From source file:no.imr.sea2data.stox.InstallerUtil.java
public static boolean installRstox(Window wnd, String ftpPath, String rFolder) { // String pkgFile = getIOTempDirFile(RSTOX + TARGZ); // retrieveRstox(ftpPath, pkgFile); wnd.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try {//from ww w . j a v a 2 s.com return RUtils.installRstox(ftpPath, rFolder); } finally { wnd.setCursor(Cursor.getDefaultCursor()); } }
From source file:tvbrowser.ui.mainframe.MainFrame.java
/** * Show Settings Dialog for a specific TabId * * @param visibleTabId/*from w ww .j a v a2 s . c o m*/ * Id of the specific Tab */ public void showSettingsDialog(final String visibleTabId) { if (mSettingsWillBeOpened) { return; } new Thread(new Runnable() { public void run() { mSettingsWillBeOpened = true; // show busy cursor Window comp = UiUtilities.getLastModalChildOf(MainFrame.getInstance()); ProgramTable programTable = MainFrame.getInstance().getProgramTableScrollPane().getProgramTable(); Cursor oldWindowCursor = comp.getCursor(); Cursor oldTableCursor = programTable.getCursor(); comp.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); programTable.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); SettingsDialog dlg = new SettingsDialog(MainFrame.this, visibleTabId); dlg.centerAndShow(); // restore cursors programTable.setCursor(oldTableCursor); comp.setCursor(oldWindowCursor); SwingUtilities.invokeLater(new Runnable() { public void run() { Settings.handleChangedSettings(); if (mPluginView != null) { mPluginView.refreshTree(); } } }); mSettingsWillBeOpened = false; } }, "Show settings dialog").start(); }