Eclipse Gef Tutorial [ 99% FREE ]
package com.example.shapeditor.figures; import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.geometry.Rectangle;
org.eclipse.core.runtime org.eclipse.ui org.eclipse.draw2d org.eclipse.gef org.eclipse.jface org.eclipse.swt org.eclipse.ui.ide Define the data structure. eclipse gef tutorial
public abstract void accept(ShapeVisitor visitor); package com
– Base class for all shapes:
private PropertyChangeSupport listeners = new PropertyChangeSupport(this); private int x, y, width, height; private int x
public class RectangleShape extends Shape @Override public void accept(ShapeVisitor visitor) visitor.visit(this);
