Class GFHandleHelper


  • public class GFHandleHelper
    extends java.lang.Object
    Collection of static helper methods for handles.
    • Constructor Summary

      Constructors 
      Constructor Description
      GFHandleHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<org.eclipse.gef.handles.AbstractHandle> createShapeHandles​(org.eclipse.gef.GraphicalEditPart owner, IConfigurationProviderInternal cp, int supportedResizeDirections, boolean movable, boolean resizeAllowed)
      Returns a list containing all handles for a given shape.
      static double getZoomLevel​(IConfigurationProvider configurationProvider)
      Returns the current zoom-level to use for the handles.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GFHandleHelper

        public GFHandleHelper()
    • Method Detail

      • getZoomLevel

        public static double getZoomLevel​(IConfigurationProvider configurationProvider)
        Returns the current zoom-level to use for the handles. This method can be overwritten to enable/disable zooming for handles.
        Parameters:
        configurationProvider - The configuration provider from which the zoom-level can be retrieved.
        Returns:
        The current zoom-level of the given configuration provider.
      • createShapeHandles

        public static java.util.List<org.eclipse.gef.handles.AbstractHandle> createShapeHandles​(org.eclipse.gef.GraphicalEditPart owner,
                                                                                                IConfigurationProviderInternal cp,
                                                                                                int supportedResizeDirections,
                                                                                                boolean movable,
                                                                                                boolean resizeAllowed)
        Returns a list containing all handles for a given shape.
        Parameters:
        owner - The shape, for which to create the handles.
        cp - The configuration provider, which can be used to access the environment.
        supportedResizeDirections - The directions, in which the shape can be resized (see PositionConstants).
        movable - true, if the shape can be moved.
        Returns:
        A list containing all handles for a given shape.