Search in sources :

Example 56 with Display

use of org.eclipse.swt.widgets.Display in project ACS by ACS-Community.

the class LostSourcesContainer method refresh.

/**
	 * Refresh the content of the list
	 */
private void refresh() {
    if (!disposed) {
        Display display = Display.getDefault();
        display.syncExec(new Runnable() {

            public void run() {
                if (!disposed) {
                    viewer.refresh();
                }
            }
        });
    }
}
Also used : Display(org.eclipse.swt.widgets.Display)

Example 57 with Display

use of org.eclipse.swt.widgets.Display in project cubrid-manager by CUBRID.

the class ExportTableDefinitionProgress method export.

/**
	 * createDatabaseWithProgress return database name
	 *
	 * @return Catalog
	 */
public boolean export() {
    Display display = Display.getDefault();
    display.syncExec(new Runnable() {

        public void run() {
            try {
                new ProgressMonitorDialog(null).run(true, false, ExportTableDefinitionProgress.this);
            } catch (Exception e) {
                LOGGER.error("", e);
            }
        }
    });
    return success;
}
Also used : ProgressMonitorDialog(org.eclipse.jface.dialogs.ProgressMonitorDialog) SQLException(java.sql.SQLException) InvocationTargetException(java.lang.reflect.InvocationTargetException) Display(org.eclipse.swt.widgets.Display)

Example 58 with Display

use of org.eclipse.swt.widgets.Display in project cubrid-manager by CUBRID.

the class LoadTableRecordCountsProgress method getTableCounts.

/**
	 * loadTablesInfo
	 * 
	 * @return Catalog
	 */
public void getTableCounts() {
    Display display = Display.getDefault();
    display.syncExec(new Runnable() {

        public void run() {
            try {
                new ProgressMonitorDialog(null).run(true, true, LoadTableRecordCountsProgress.this);
            } catch (Exception e) {
                LOGGER.error("", e);
            }
        }
    });
}
Also used : ProgressMonitorDialog(org.eclipse.jface.dialogs.ProgressMonitorDialog) InvocationTargetException(java.lang.reflect.InvocationTargetException) SQLException(java.sql.SQLException) Display(org.eclipse.swt.widgets.Display)

Example 59 with Display

use of org.eclipse.swt.widgets.Display in project cubrid-manager by CUBRID.

the class OpenViewsDetailInfoPartProgress method loadViewsInfo.

/**
	 * loadViewsInfo
	 *
	 * @return Catalog
	 */
public void loadViewsInfo() {
    Display display = Display.getDefault();
    display.syncExec(new Runnable() {

        public void run() {
            try {
                new ProgressMonitorDialog(null).run(true, false, OpenViewsDetailInfoPartProgress.this);
            } catch (Exception e) {
                LOGGER.error(e.getMessage(), e);
            }
        }
    });
}
Also used : ProgressMonitorDialog(org.eclipse.jface.dialogs.ProgressMonitorDialog) InvocationTargetException(java.lang.reflect.InvocationTargetException) Display(org.eclipse.swt.widgets.Display)

Example 60 with Display

use of org.eclipse.swt.widgets.Display in project cubrid-manager by CUBRID.

the class TaskExecutor method openErrorBox.

/**
	 * 
	 * Open error box in task executor
	 * 
	 * @param shell the Shell object
	 * @param msg the message
	 * @param monitor the IProgressMonitor
	 * @return <code>true</code> if has error and monitor do not canceled;
	 *         <code>false</code> otherwise
	 */
public boolean openErrorBox(final Shell shell, final String msg, IProgressMonitor monitor) {
    if (msg != null && msg.length() > 0 && !monitor.isCanceled()) {
        monitor.done();
        Display display = Display.getDefault();
        display.syncExec(new Runnable() {

            public void run() {
                CommonUITool.openErrorBox(shell, msg);
            }
        });
        return true;
    }
    return false;
}
Also used : Display(org.eclipse.swt.widgets.Display)

Aggregations

Display (org.eclipse.swt.widgets.Display)485 Shell (org.eclipse.swt.widgets.Shell)184 Point (org.eclipse.swt.graphics.Point)76 Test (org.junit.Test)63 FillLayout (org.eclipse.swt.layout.FillLayout)62 Color (org.eclipse.swt.graphics.Color)52 Button (org.eclipse.swt.widgets.Button)50 Rectangle (org.eclipse.swt.graphics.Rectangle)48 GridLayout (org.eclipse.swt.layout.GridLayout)43 Composite (org.eclipse.swt.widgets.Composite)43 GridData (org.eclipse.swt.layout.GridData)39 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)32 Image (org.eclipse.swt.graphics.Image)32 Label (org.eclipse.swt.widgets.Label)32 SWT (org.eclipse.swt.SWT)29 InvocationTargetException (java.lang.reflect.InvocationTargetException)28 StyledText (org.eclipse.swt.custom.StyledText)24 Text (org.eclipse.swt.widgets.Text)24 ProgressMonitorDialog (org.eclipse.jface.dialogs.ProgressMonitorDialog)23 Font (org.eclipse.swt.graphics.Font)23