Eclipse | Gef Tutorial
public void removePropertyChangeListener(PropertyChangeListener listener) listeners.removePropertyChangeListener(listener);
private PropertyChangeSupport listeners = new PropertyChangeSupport(this); private int x, y, width, height; eclipse gef tutorial
package com.example.shapeditor.figures; import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.geometry.Rectangle; private int x
:
// Getters & Setters with property change firing public int getX() return x; public void setX(int x) int old = this.x; this.x = x; listeners.firePropertyChange(LOCATION_PROP, old, x); this.x = x
@Override public void activate() super.activate(); ((Shape) getModel()).addPropertyChangeListener(evt -> refreshVisuals());


