@Override public void widgetDisposed(DisposeEvent event) { location = ((Shell) event.widget).getLocation(); } }
public final void forceSaveLocation() { if (!splash.isDisposed()) { this.storeLastLocation(splash.getLocation()); } }
public void controlMoved(ControlEvent e) { if (!shell.getMaximized()) { Point location = shell.getLocation(); x = location.x; y = location.y; } } public void controlResized(ControlEvent e) {
public void controlMoved(ControlEvent e) { if (!shell.getMaximized()) { Point location = shell.getLocation(); x = location.x; y = location.y; } } public void controlResized(ControlEvent e) {
private static final void toggleAlwaysOnTop(Shell shell, boolean isOnTop){ long handle = shell.handle; Point location = shell.getLocation(); Point dimension = shell.getSize(); OS.SetWindowPos(handle, isOnTop ? OS.HWND_TOPMOST : OS.HWND_NOTOPMOST,location.x, location.y, dimension.x, dimension.y, 0); }
public static Point getLocationRelativeToShell(Control control) { Point controlLocation = control.toDisplay(0, 0); Point shellLocation = control.getShell().getLocation(); return new Point(controlLocation.x - shellLocation.x, controlLocation.y - shellLocation.y); }
@Override public void expansionStateChanged(ExpansionEvent e) { launchData.setShowRecentWorkspaces(((ExpandableComposite) e.getSource()).isExpanded()); Point size = getInitialSize(); Shell shell = getShell(); shell.setBounds(getConstrainedShellBounds( new Rectangle(shell.getLocation().x, shell.getLocation().y, size.x, size.y))); } });
private void updatePopupLocation(boolean force) { if (! force && fSnapPosition == SNAP_POSITION_LOWER_RIGHT) return; packPopup(); Point loc= computePopupLocation(fSnapPosition); if (loc != null && ! loc.equals(fPopup.getLocation())) { fPopup.setLocation(loc); // XXX workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=170774 // fPopup.moveBelow(fEditor.getSite().getShell().getShells()[0]); } }
protected void updatePopupLocation() { packPopup(); Point loc = computePopupLocation(); if (loc != null && !loc.equals(popup.getLocation())) { popup.setLocation(loc); } }
private void updatePopupLocation(boolean force) { if (! force && fSnapPosition == SNAP_POSITION_LOWER_RIGHT) return; packPopup(); Point loc= computePopupLocation(fSnapPosition); if (loc != null && ! loc.equals(fPopup.getLocation())) { fPopup.setLocation(loc); // XXX workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=170774 // fPopup.moveBelow(fEditor.getSite().getShell().getShells()[0]); } }
protected Point getStackedLocation(Shell shell, Shell parent) { Point p= parent.getLocation(); Point size= parent.getSize(); p.x += size.x / 4; p.y += size.y; p= parent.toDisplay(p); Rectangle shellBounds= shell.getBounds(); Rectangle displayBounds= shell.getDisplay().getClientArea(); shiftHorizontalLocation(p, shellBounds, displayBounds); shiftVerticalLocation(p, shellBounds, displayBounds); return p; }
protected Point getStackedLocation(Shell shell, Shell parent) { Point p= parent.getLocation(); Point size= parent.getSize(); p.x += size.x / 4; p.y += size.y; p= parent.toDisplay(p); Rectangle shellBounds= shell.getBounds(); Rectangle displayBounds= shell.getDisplay().getClientArea(); shiftHorizontalLocation(p, shellBounds, displayBounds); shiftVerticalLocation(p, shellBounds, displayBounds); return p; }
protected Point getStackedLocation(Shell shell, Shell parent) { Point p= parent.getLocation(); Point size= parent.getSize(); p.x += size.x / 4; p.y += size.y; p= parent.toDisplay(p); Point shellSize= shell.getSize(); Monitor monitor= getClosestMonitor(parent.getDisplay(), new Rectangle(p.x, p.y, 0, 0)); Rectangle displayBounds= monitor.getClientArea(); constrainLocation(p, shellSize, displayBounds); return p; }
protected Point getStackedLocation(Shell shell, Shell parent) { Point p= parent.getLocation(); Point size= parent.getSize(); p.x += size.x / 4; p.y += size.y; p= parent.toDisplay(p); Point shellSize= shell.getSize(); Monitor monitor= getClosestMonitor(parent.getDisplay(), new Rectangle(p.x, p.y, 0, 0)); Rectangle displayBounds= monitor.getClientArea(); constrainLocation(p, shellSize, displayBounds); return p; }
/** * Stores it current configuration in the dialog store. */ private void writeSettings() { Point location= getShell().getLocation(); fSettings.put("x", location.x); //$NON-NLS-1$ fSettings.put("y", location.y); //$NON-NLS-1$ Point size= getShell().getSize(); fSettings.put("width", size.x); //$NON-NLS-1$ fSettings.put("height", size.y); //$NON-NLS-1$ } }
/** * Stores it current configuration in the dialog store. */ private void writeSettings() { IDialogSettings s= getDialogSettings(); Point location= getShell().getLocation(); s.put("x", location.x); //$NON-NLS-1$ s.put("y", location.y); //$NON-NLS-1$ Point size= getShell().getSize(); s.put("width", size.x); //$NON-NLS-1$ s.put("height", size.y); //$NON-NLS-1$ }
private void writeConfiguration() { IDialogSettings s = getDialogSettings(); Point location = getShell().getLocation(); s.put("x", location.x); //$NON-NLS-1$ s.put("y", location.y); //$NON-NLS-1$ Point size = getShell().getSize(); s.put("width", size.x); //$NON-NLS-1$ s.put("height", size.y); //$NON-NLS-1$ }
/** * Stores it current configuration in the dialog store. */ private void writeSettings() { IDialogSettings s= getDialogSettings(); Point location= getShell().getLocation(); s.put("x", location.x); //$NON-NLS-1$ s.put("y", location.y); //$NON-NLS-1$ Point size= getShell().getSize(); s.put("width", size.x); //$NON-NLS-1$ s.put("height", size.y); //$NON-NLS-1$ }
private void writeConfiguration() { IDialogSettings s = getDialogSettings(); Point location = getShell().getLocation(); s.put("x", location.x); //$NON-NLS-1$ s.put("y", location.y); //$NON-NLS-1$ Point size = getShell().getSize(); s.put("width", size.x); //$NON-NLS-1$ s.put("height", size.y); //$NON-NLS-1$ }
/** * Stores it current configuration in the dialog store. */ private void writeSettings() { IDialogSettings s= getDialogSettings(); Point location= getShell().getLocation(); s.put("x", location.x); //$NON-NLS-1$ s.put("y", location.y); //$NON-NLS-1$ Point size= getShell().getSize(); s.put("width", size.x); //$NON-NLS-1$ s.put("height", size.y); //$NON-NLS-1$ }