/** * @param constrainee * @param container */ private void constrainRectangleToContainer( Rectangle constrainee, Rectangle container ) { Point originalSize = Geometry.getSize( constrainee ); Point containerSize = Geometry.getSize( container ); Point oversize = Geometry.subtract( originalSize, containerSize ); if ( oversize.x > 0 ) { constrainee.width = originalSize.x - oversize.x; } if ( oversize.y > 0 ) { constrainee.height = originalSize.y - oversize.y; } // Detect if the dialog was positioned outside the container Geometry.moveInside( constrainee, container ); }
Rectangle resizedRect = Geometry.copy( shellSize ); constrainRectangleToContainer( resizedRect, entireClientArea );
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 3.1 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
public void run() { l.propertyChange(new PropertyChangeEvent(this, actionId, null, null)); } });
public void propertyChange(PropertyChangeEvent event) { OverlayKey key= findOverlayKey(event.getProperty()); if (key != null) propagateProperty(fParent, key, fStore); } }
private void fireEvent(PropertyChangeEvent event) { for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
@Override public final int compareTo(final Object object) { final KeySequence castedObject = (KeySequence) object; return Util.compare(triggers, castedObject.triggers); }
@Override public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { PropertyChangeEvent event= new PropertyChangeEvent(this, name, oldValue, newValue); for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 3.1 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
/** * Returns the size constraints. * * @return the size constraints or <code>null</code> if not set * @see #setSizeConstraints(int, int) */ protected final Point getSizeConstraints() { return fSizeConstraints != null ? Geometry.copy(fSizeConstraints) : null; }
@Override public void run() { l.propertyChange(new PropertyChangeEvent(this, actionId, null, null)); } });
/** * Runs the given safe runnable using the safe runnable runner. This is a * convenience method, equivalent to: * <code>SafeRunnable.getRunner().run(runnable)</code>. * * @param runnable * the runnable to run * @since 1.0 */ public static void run(ISafeRunnable runnable) { getRunner().run(runnable); }
@Override public void run() { l.propertyChange(new PropertyChangeEvent(this, actionId, null, null)); } });
@Override public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { PropertyChangeEvent event= new PropertyChangeEvent(this, name, oldValue, newValue); for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
@Override public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { PropertyChangeEvent event= new PropertyChangeEvent(this, name, oldValue, newValue); for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
@Override public void run() throws Exception { listener.propertyChange(new PropertyChangeEvent(EvaluationService.this, property, oldValue, newValue)); } });
@Override public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { PropertyChangeEvent event= new PropertyChangeEvent(this, name, oldValue, newValue); for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
/** * Fires a property change event with the given source, property name, old and new value. Used * when the event source should be different from this mockup preference store. * @param source The event source * @param name The property name * @param oldValue The property's old value * @param newValue The property's new value */ public void firePropertyChangeEvent(Object source, String name, Object oldValue, Object newValue) { PropertyChangeEvent event= new PropertyChangeEvent(source, name, oldValue, newValue); for (IPropertyChangeListener listener : fListeners) { listener.propertyChange(event); } }
protected void notifyChange(String propertyName, Object oldValue, Object newValue){ if (listeners!=null) { PropertyChangeEvent e = new PropertyChangeEvent(this,propertyName,oldValue,newValue); for (IPropertyChangeListener listener : listeners) listener.propertyChange(e); } } //}