@@ -0,0 +1,2393 @@
+package org.csstudio.opibuilder.feedback;%0D%0A%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport org.csstudio.opibuilder.model.AbstractWidgetModel;%0D%0Aimport org.eclipse.draw2d.IFigure;%0D%0Aimport org.eclipse.draw2d.Shape;%0D%0Aimport org.eclipse.draw2d.geometry.Dimension;%0D%0Aimport org.eclipse.draw2d.geometry.Insets;%0D%0Aimport org.eclipse.draw2d.geometry.Point;%0D%0Aimport org.eclipse.draw2d.geometry.PrecisionRectangle;%0D%0Aimport org.eclipse.draw2d.geometry.Rectangle;%0D%0Aimport org.eclipse.gef.GraphicalEditPart;%0D%0Aimport org.eclipse.gef.Handle;%0D%0Aimport org.eclipse.gef.commands.Command;%0D%0Aimport org.eclipse.gef.requests.ChangeBoundsRequest;%0D%0Aimport org.eclipse.gef.requests.CreateRequest;%0D%0A%0D%0A/**A default implementation of %7B@link IGraphicalFeedbackFactory%7D which does nothing to changing%0D%0A * default graphical feedback behavior. %0D%0A * Subclass can override this class to create customized feedback behavior.%0D%0A * @author Xihui Chen%0D%0A *%0D%0A */%0D%0Apublic class DefaultGraphicalFeedbackFactory implements%0D%0A%09%09IGraphicalFeedbackFactory %7B%0D%0A%0D%0A%09@Override%0D%0A%09public IFigure createDragSourceFeedbackFigure(AbstractWidgetModel model,%0D%0A%09%09%09Rectangle initalBounds) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void showChangeBoundsFeedback(AbstractWidgetModel widgetModel,%0D%0A%09%09%09PrecisionRectangle bounds, IFigure feedbackFigure,%0D%0A%09%09%09ChangeBoundsRequest request) %7B%09%0D%0A%0D%0A%09%09feedbackFigure.translateToRelative(bounds);%0D%0A%09%09feedbackFigure.setBounds(bounds);%0D%0A%09%09%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Shape createSizeOnDropFeedback(CreateRequest createRequest) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void showSizeOnDropFeedback(CreateRequest request,%0D%0A%09%09%09IFigure feedback, Insets insets) %7B%0D%0A%09%09Point p = new Point(request.getLocation().getCopy());%0D%0A%09%09feedback.translateToRelative(p);%0D%0A%09%09Dimension size = request.getSize().getCopy();%0D%0A%09%09feedback.translateToRelative(size);%0D%0A%09%09feedback.setBounds(new Rectangle(p, size)%0D%0A%09%09%09%09.expand(insets));%0D%0A%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Class%3C?%3E getCreationTool() %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Command createChangeBoundsCommand(AbstractWidgetModel widgetModel,%0D%0A%09%09%09ChangeBoundsRequest request, Rectangle targetBounds) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public Command createInitialBoundsCommand(AbstractWidgetModel widgetModel,%0D%0A%09%09%09CreateRequest request, Rectangle targetBounds) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public List%3CHandle%3E createCustomHandles(GraphicalEditPart editPart) %7B%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

add DefaultGraphicalFeedbackFactory.