Java Code Examples for org.eclipse.swt.SWT#MODELESS

The following examples show how to use org.eclipse.swt.SWT#MODELESS . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public GenericInfoPopupDialog(Shell parentShell, String title, String message, final Runnable runnable)
{
	super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false,
			title, null);
	this.message = message;

	clickListener = new MouseAdapter()
	{

		@Override
		public void mouseDown(MouseEvent e)
		{
			if (runnable != null)
			{
				runnable.run();
			}
			close();
		}
	};
}
 
Example 2
/**
 * Warns user about a Generic Disk Error problem
 * 
 * @param e
 */
protected void handle(final DiskException e) {
	if (e instanceof DiskCorruptException) {
		this.handle((DiskCorruptException) e);
		return;
	}
	final MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK | SWT.MODELESS);
	box.setText(textBundle.get("SwtAppleCommander.DiskException.Title")); //$NON-NLS-1$
	box.setMessage(
			  textBundle.format("SwtAppleCommander.DiskException.Message", //$NON-NLS-1$
					  e.imagepath, e.toString()));
	box.open();
}
 
Example 3
Source Project: SWET   File: ChoicesDialog.java    License: MIT License 5 votes vote down vote up
private void checkStyle(int style) {
	if ((style & ~(SWT.APPLICATION_MODAL | SWT.PRIMARY_MODAL | SWT.SYSTEM_MODAL
			| SWT.MODELESS)) != 0) {
		throw new SWTException("Unsupported style");
	}
	if (Integer.bitCount(style) > 1) {
		throw new SWTException(
				"Unsupports only one of APPLICATION_MODAL, PRIMARY_MODAL, SYSTEM_MODAL or SWT.MODELESS");
	}
}
 
Example 4
@VisibleForTesting
AccountsPanel(Shell parent, IGoogleLoginService loginService, LabelImageLoader imageLoader) {
  super(parent, SWT.MODELESS,
      true /* takeFocusOnOpen */,
      false /* persistSize */,
      false /* persistLocation */,
      false /* showDialogMenu */,
      false /* showPersistActions */,
      null /* no title area */, null /* no info text area */);
  this.loginService = loginService;
  this.imageLoader = imageLoader;
}
 
Example 5
public TexInformationControl(TexEditor editor, Shell container) {
    this.editor = editor;
    document = editor.getTexDocument();
    refMana = editor.getDocumentModel().getRefMana();
    shell = new Shell(container, SWT.NO_FOCUS | SWT.ON_TOP | SWT.MODELESS);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 3;
    layout.marginWidth = 3;
    shell.setLayout(layout);
    display = shell.getDisplay();
    shell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
}
 
Example 6
Source Project: gama   File: GamaColorMenu.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void openView(final IColorRunnable runnable, final RGB initial) {
	final Shell shell = new Shell(WorkbenchHelper.getDisplay(), SWT.MODELESS);
	final ColorDialog dlg = new ColorDialog(shell, SWT.MODELESS);
	dlg.setText("Choose a custom color");
	dlg.setRGB(initial);
	final RGB rgb = dlg.open();
	// final int a = StringUtils.INDEX_NOT_FOUND;
	if (rgb != null) {
		if (runnable != null) {
			runnable.run(rgb.red, rgb.green, rgb.blue);
		}
	}
}
 
Example 7
public TitaniumUpdatePopup(Shell parentShell, final Runnable updateAction)
{
	super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false,
			MessageFormat.format(EplMessages.TitaniumUpdatePopup_update_title, EclipseUtil.getStudioPrefix()), null);

	clickListener = new MouseAdapter()
	{
		public void mouseDown(MouseEvent e)
		{
			updateAction.run();
			close();
		}
	};

}
 
Example 8
Source Project: logbook   File: BattleAggDialog.java    License: MIT License 4 votes vote down vote up
/**
 * Create the dialog.
 * @param parent
 */
public BattleAggDialog(Shell parent) {
    super(parent, SWT.SHELL_TRIM | SWT.MODELESS);
    this.setText("SWT Dialog");
}
 
Example 9
Source Project: logbook   File: AbstractTableDialogEx.java    License: MIT License 4 votes vote down vote up
/**
 * コンストラクター
 */
public AbstractTableDialogEx(Shell parent, Class<T> clazz) {
    super(parent, SWT.SHELL_TRIM | SWT.MODELESS);
    this.clazz = clazz;
}
 
Example 10
Source Project: logbook   File: ResourceChartDialogEx.java    License: MIT License 4 votes vote down vote up
/**
 * Create the dialog.
 * @param parent
 */
public ResourceChartDialogEx(Shell parent) {
    super(parent, SWT.SHELL_TRIM | SWT.MODELESS);
    this.setText("資材チャート");
}
 
Example 11
Source Project: offspring   File: InspectBlockDialog.java    License: MIT License 4 votes vote down vote up
@Override
protected void setShellStyle(int newShellStyle) {
  super.setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE
      | SWT.RESIZE);
  setBlockOnOpen(false);
}
 
Example 12
Source Project: offspring   File: InspectAccountDialog.java    License: MIT License 4 votes vote down vote up
@Override
protected void setShellStyle(int newShellStyle) {
  super.setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE
      | SWT.RESIZE);
  setBlockOnOpen(false);
}
 
Example 13
Source Project: offspring   File: InspectTransactionDialog.java    License: MIT License 4 votes vote down vote up
@Override
protected void setShellStyle(int newShellStyle) {
  super.setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE
      | SWT.RESIZE);
  setBlockOnOpen(false);
}
 
Example 14
Source Project: jbt   File: DetailsDialog.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a DetailsDialog. The style of the dialog (the shell) is
 * <code>SWT.CLOSE | SWT.RESIZE | SWT.MAX | SWT.MODELESS</code>. .
 * 
 * @param title
 *            title of the dialog.
 * @param message
 *            main message shown by the dialog.
 * @param details
 *            text that is shown in the details area.
 * @param iconType
 *            type of the icon that is shown in the dialog. Must be one of
 *            the following: <code>{@link #ERROR}</code>,
 *            <code>{@link #WARNING}</code>,
 *            <code>{@link #INFORMATION}</code> ,
 *            <code>{@link #QUESTION}</code>.
 * @param parentShell
 *            this dialog's parent shell. If null, it is a top level shell.
 */
public DetailsDialog(String title, String message, String details, int iconType,
		Shell parentShell) {
	this(title, message, details, iconType, parentShell, SWT.CLOSE | SWT.RESIZE | SWT.MAX
			| SWT.MODELESS);
}