/** * closes the tray without changing any flag */ private void silentTrayClose() { super.closeTray(); }
@Override protected void handleShellCloseEvent() { /* * Close the tray to ensure that those dialogs that remember their * size do not store the tray size. */ if (getTray() != null) { closeTray(); } super.handleShellCloseEvent(); }
@Override protected void handleShellCloseEvent() { /* * Close the tray to ensure that those dialogs that remember their * size do not store the tray size. */ if (getTray() != null) { closeTray(); } super.handleShellCloseEvent(); }
public boolean close() { /* * Close the tray to ensure that those dialogs that remember their * size do not store the tray size. */ if (getTray() != null) { closeTray(); } return super.close(); }
@Override public void closeTray() throws IllegalStateException { if (getTray() != null) { super.closeTray(); } //preserve state during modality switch if (!getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH)) { dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.FALSE); } if (launchTrayLink != null && !launchTrayLink.isDisposed()) { launchTrayLink.setEnabled(providesSupport() && !getBooleanValue(IStatusDialogConstants.TRAY_OPENED)); } }
/** * Executes the command. */ public Object execute(ExecutionEvent event) throws ExecutionException { Display display = Display.getCurrent(); if (display == null) { display = Display.getDefault(); } if (display != null) { Shell shell = Display.getCurrent().getActiveShell(); if (shell != null && !shell.isDisposed()) { Object shellData = shell.getData(); if (shellData instanceof TrayDialog) { TrayDialog trayDialog = (TrayDialog)shellData; if (trayDialog.getTray() instanceof HelpTray) { trayDialog.closeTray(); } } } } return null; } }
private void helpPressed() { if (getTray() == null) { if (getShell() != null) { Control c = getShell().getDisplay().getFocusControl(); while (c != null) { if (c.isListening(SWT.Help)) { c.notifyListeners(SWT.Help, new Event()); break; } c = c.getParent(); } } } else { closeTray(); } }
private void helpPressed() { if (getTray() == null || fHelpButton != null && fHelpButton.getSelection()) { // help button was not selected before if (getShell() != null) { Control c = getShell().getDisplay().getFocusControl(); while (c != null) { if (c.isListening(SWT.Help)) { c.notifyListeners(SWT.Help, new Event()); break; } c = c.getParent(); } if (fHelpButton != null && getTray() != null) { fHelpButton.setSelection(true); } } } else { closeTray(); } }