Interface IGraphicalFeedbackFactory

All Known Implementing Classes:
AbstractFixRatioSizeFeedbackFactory, ArrayFeedbackFactory, DefaultGraphicalFeedbackFactory, GaugeFeedbackFactory, GroupingContainerFeedbackFactory, KnobFeedbackFactory, LEDFeedbackFactory, MeterFeedbackFactory, PolygonFeedbackFactory, PolyLineFeedbackFactory

public interface IGraphicalFeedbackFactory
A graphical feedback factory is used to summarize and expose graphical feedback settings, which are normally spread over different GEF EditPolicies. Contributors can implement their own factory to provide suitable graphical feedback for their widget models.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.gef.commands.Command
    createChangeBoundsCommand(AbstractWidgetModel widgetModel, org.eclipse.gef.requests.ChangeBoundsRequest request, org.eclipse.draw2d.geometry.Rectangle targetBounds)
    Returns a command, which handles the size and location changes, implied by the change bounds request and the target bounds.
    List<org.eclipse.gef.Handle>
    createCustomHandles(org.eclipse.gef.GraphicalEditPart editPart)
    Creates and returns custom handles Handle for the specified edit part.
    org.eclipse.draw2d.IFigure
    createDragSourceFeedbackFigure(AbstractWidgetModel model, org.eclipse.draw2d.geometry.Rectangle initalBounds)
    The returned figure will be used to provide graphical feedback during drag or resize operations.
    org.eclipse.gef.commands.Command
    createInitialBoundsCommand(AbstractWidgetModel widgetModel, org.eclipse.gef.requests.CreateRequest request, org.eclipse.draw2d.geometry.Rectangle targetBounds)
    Returns a command, which handles the initial size and location during the creation of new widget models.
    org.eclipse.draw2d.Shape
    createSizeOnDropFeedback(org.eclipse.gef.requests.CreateRequest createRequest)
    The returned figure will be used to provide graphical feedback during the creation of new widget models.
    Gets the class type of a custom creation tool for the kind of objects, this factory is responsible for.
    void
    showChangeBoundsFeedback(AbstractWidgetModel widgetModel, org.eclipse.draw2d.geometry.PrecisionRectangle bounds, org.eclipse.draw2d.IFigure feedbackFigure, org.eclipse.gef.requests.ChangeBoundsRequest request)
    This method will be called, when the size or location of the feedback changes during drag or resize operations.
    void
    showSizeOnDropFeedback(org.eclipse.gef.requests.CreateRequest request, org.eclipse.draw2d.IFigure feedbackFigure, org.eclipse.draw2d.geometry.Insets insets)
    This method will be called, when the size or location of the feedback changes during the creation process.The specified figure equals the figure, which is created by createSizeOnDropFeedback(CreateRequest).
  • Method Details

    • createDragSourceFeedbackFigure

      org.eclipse.draw2d.IFigure createDragSourceFeedbackFigure(AbstractWidgetModel model, org.eclipse.draw2d.geometry.Rectangle initalBounds)
      The returned figure will be used to provide graphical feedback during drag or resize operations.
      Parameters:
      model - the widget model
      initalBounds - the initial bounds
      Returns:
      a customized feedback figure during draging, null if not necessary.
    • showChangeBoundsFeedback

      void showChangeBoundsFeedback(AbstractWidgetModel widgetModel, org.eclipse.draw2d.geometry.PrecisionRectangle bounds, org.eclipse.draw2d.IFigure feedbackFigure, org.eclipse.gef.requests.ChangeBoundsRequest request)
      This method will be called, when the size or location of the feedback changes during drag or resize operations. The specified figure equals the figure, which is created by the createDragSourceFeedbackFigure(AbstractWidgetModel, Rectangle). Implementors should apply the changed bounds to their individual feedback figure.
      Parameters:
      widgetModel - the corresponding widget model
      bounds - the new bounds
      feedbackFigure - the current feedback figure
      request - the change request
    • createSizeOnDropFeedback

      org.eclipse.draw2d.Shape createSizeOnDropFeedback(org.eclipse.gef.requests.CreateRequest createRequest)
      The returned figure will be used to provide graphical feedback during the creation of new widget models.
      Parameters:
      createRequest - the create request
      Returns:
      a customized droop feedback figure, null if it is not necessary.
    • showSizeOnDropFeedback

      void showSizeOnDropFeedback(org.eclipse.gef.requests.CreateRequest request, org.eclipse.draw2d.IFigure feedbackFigure, org.eclipse.draw2d.geometry.Insets insets)
      This method will be called, when the size or location of the feedback changes during the creation process.The specified figure equals the figure, which is created by createSizeOnDropFeedback(CreateRequest).
      Parameters:
      request - the create request
      feedbackFigure - the current feedback figure
      insets - any insets that need to be applied to the creation feedback's bounds
    • getCreationTool

      Class getCreationTool()
      Gets the class type of a custom creation tool for the kind of objects, this factory is responsible for.
      Returns:
      the class type of a custom creation tool or null, if the default creation tool should be used
    • createChangeBoundsCommand

      org.eclipse.gef.commands.Command createChangeBoundsCommand(AbstractWidgetModel widgetModel, org.eclipse.gef.requests.ChangeBoundsRequest request, org.eclipse.draw2d.geometry.Rectangle targetBounds)
      Returns a command, which handles the size and location changes, implied by the change bounds request and the target bounds.
      Parameters:
      widgetModel - the affected widget model
      request - a change bounds request (may contain extended data, when a custom creation tool (see getCreationTool()) or custom handles (createCustomHandles(GraphicalEditPart)) are used.
      targetBounds - the new bounds
      Returns:
      a undoable command, which handles the size and location changes, null if default change bounds command should be used.
    • createInitialBoundsCommand

      org.eclipse.gef.commands.Command createInitialBoundsCommand(AbstractWidgetModel widgetModel, org.eclipse.gef.requests.CreateRequest request, org.eclipse.draw2d.geometry.Rectangle targetBounds)
      Returns a command, which handles the initial size and location during the creation of new widget models.
      Parameters:
      widgetModel - the created widget model
      request - the create request (may contain extended data, when a custom creation tool (see getCreationTool()) is used
      targetBounds - the initial bounds
      Returns:
      a undoable command, which sets up the initial size and location changes. null if it is not necessary to initialize size and location.
    • createCustomHandles

      List<org.eclipse.gef.Handle> createCustomHandles(org.eclipse.gef.GraphicalEditPart editPart)
      Creates and returns custom handles Handle for the specified edit part.
      Parameters:
      editPart - the edit part
      Returns:
      a list, which contains all custom handles or null, if no custom handles should be created