Package docking.util.image

# Class CalloutInfo

java.lang.Object
docking.util.image.CalloutInfo

public class CalloutInfo extends Object
An object that describes a component to be 'called-out'. A callout is a way to emphasize a widget (usually this is only needed for small GUI elements, like an action or icon).

The given component info is used to render a magnified image of the given component onto another image. For this to work, the rendering engine will need to know how to translate the component's location to that of the image space onto which the callout will be drawn. This is the purpose of requiring the 'destination component'. That component provides the bounds that will be used to move the component's relative position (which is relative to the components parent).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CalloutInfo(Component destinationComponent, Component sourceComponent)`
  Constructor for the destination component, the source component and the area that is to be captured.
  `CalloutInfo(Component destinationComponent, Component sourceComponent, Rectangle clientShape)`
  Constructor for the destination component, the source component and the area that is to be captured.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Rectangle`
  `getBounds()`
  `double`
  `getMagnification()`
  `void`
  `moveToDestination(Rectangle r)`
  Moves the given rectangle to the image destination space.
  `void`
  `moveToImage(Rectangle r, ImageUtils.Padding padding)`
  Moves the given rectangle to the image destination space.
  `void`
  `moveToScreen(Rectangle r)`
  Moves the given rectangle to screen space.
  `void`
  `setMagnification(double magnification)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CalloutInfo

    public CalloutInfo(Component destinationComponent, Component sourceComponent)
    Constructor for the destination component, the source component and the area that is to be captured. This constructor will call out the entire shape of the given source component.

    The destination component needs to be the item that was captured in the screenshot. If you captured a window, then pass that window as the destination. If you captured a sub-component of a window, then pass that sub-component as the destination.

    Parameters:
      `destinationComponent` - the component over which the image will be painted
      `sourceComponent` - the component that contains the area that will be called out

  - ### CalloutInfo

    public CalloutInfo(Component destinationComponent, Component sourceComponent, Rectangle clientShape)
    Constructor for the destination component, the source component and the area that is to be captured.

    The destination component needs to be the item that was captured in the screenshot. If you captured a window, then pass that window as the destination. If you captured a sub-component of a window, then pass that sub-component as the destination.

    Parameters:
      `destinationComponent` - the component over which the image will be painted
      `sourceComponent` - the component that contains the area that will be called out
      `clientShape` - the shape that will be called out

- ## Method Details

  - ### setMagnification

    public void setMagnification(double magnification)

  - ### getMagnification

    public double getMagnification()

  - ### moveToImage

    public void moveToImage(Rectangle r, ImageUtils.Padding padding)
    Moves the given rectangle to the image destination space. Clients use this to create new shapes using the client space and then move them to the image destination space.
    Parameters:
      `r` - the rectangle
      `padding` - any padding around the destination image

  - ### moveToDestination

    public void moveToDestination(Rectangle r)
    Moves the given rectangle to the image destination space. Clients use this to create new shapes using the client space. This destination space is not the same as the final image that will get created.
    Parameters:
      `r` - the rectangle

  - ### moveToScreen

    public void moveToScreen(Rectangle r)
    Moves the given rectangle to screen space. Clients use this to create new shapes using the client space and then move them to the image destination space.
    Parameters:
      `r` - the rectangle

  - ### getBounds

    public Rectangle getBounds()