Package com.treemap

# Class AbstractTreeMapToolTip<N,Row,Column,Component,Color,Font>

java.lang.Object
com.treemap.AbstractTreeMapToolTip<N,Row,Column,Component,Color,Font>

All Implemented Interfaces:
  `TreeMapToolTip<N,Row,Column,Color,Font>`

Direct Known Subclasses:
  `DefaultTreeMapToolTip`, `SwingTreeMapToolTip`

public abstract class AbstractTreeMapToolTip<N,Row,Column,Component,Color,Font> extends Object implements TreeMapToolTip<N,Row,Column,Color,Font>
Created by luc on 06.05.17.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.treemap.TreeMapToolTip

  `TreeMapToolTip.ToolTipType`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final int`
  `leftShift`
  `protected N`
  `node`
  `protected TreeMapPopup`
  `popup`
  `protected static final int`
  `topShift`
  `protected TreeMapView<Component,N,Row,Column,Color,Font>`
  `view`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTreeMapToolTip(TreeMapView<Component,N,Row,Column,Color,Font> view)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TreeMapPopup`
  `createPopup()`
  Creates a popup.
  `protected com.macrofocus.igraphics.CPColor<Color>`
  `getBorderColor()`
  `com.macrofocus.igraphics.Insets`
  `getInsets()`
  `N`
  `getNode()`
  Gets the current node that the tooltip should display information about.
  `TreeMapPopup`
  `getPopup()`
  Gets the popup or create one if one doesn't exist yet.
  `com.macrofocus.geom.Point`
  `getPopupLocation()`
  `com.macrofocus.geom.Point`
  `getPreferredLocation(com.macrofocus.geom.Point p)`
  Gets the preferred location of the tooltip relative to the TreeMapView.
  `Dimension`
  `getPreferredSize(TGraphics<Color,Font> g)`
  `int`
  `getPreferredWidth()`
  Gets the preferred width of the tooltip.
  `ToolTipTreeMapRenderer`
  `getRenderer()`
  `protected TreeMapView<Component,N,Row,Column,Color,Font>`
  `getView()`
  Gets the view associated with this tooltip.
  `protected void`
  `hidePopup()`
  Hides the popup.
  `void`
  `paintBackground(TGraphics<Color,Font> g)`
  Paints the background of the tooltip.
  `void`
  `paintText(TGraphics<Color,Font> g)`
  Paints the values and the labels of the tooltip.
  `void`
  `setNode(N node)`
  Sets the current node that the tooltip should display information about.
  `void`
  `setPreferredWidth(int width)`
  Sets the preferred width of the tooltip.
  `void`
  `setRenderer(ToolTipTreeMapRenderer renderer)`
  `void`
  `showNode(N node)`
  Shows the current node that the tooltip should display information about.
  `protected void`
  `showPopup(int x, int y)`
  Shows the popup at the specified x and y coordinates.

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

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

  ### Methods inherited from interface com.treemap.TreeMapToolTip

  `getHeight, getPreferredLocation, getType, getWidth, setSize, setType`

- ## Field Details

  - ### view

    protected TreeMapView<Component,N,Row,Column,Color,Font> view

  - ### node

    protected N node

  - ### popup

    protected TreeMapPopup popup

  - ### topShift

    protected static final int topShift
    See Also:
      - Constant Field Values

  - ### leftShift

    protected static final int leftShift
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AbstractTreeMapToolTip

    public AbstractTreeMapToolTip(TreeMapView<Component,N,Row,Column,Color,Font> view)

- ## Method Details

  - ### getRenderer

    public ToolTipTreeMapRenderer getRenderer()

  - ### setRenderer

    public void setRenderer(ToolTipTreeMapRenderer renderer)

  - ### getInsets

    public com.macrofocus.igraphics.Insets getInsets()

  - ### getPreferredSize

    public Dimension getPreferredSize(TGraphics<Color,Font> g)
    Specified by:
      `getPreferredSize` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `g` -

  - ### getBorderColor

    protected com.macrofocus.igraphics.CPColor<Color> getBorderColor()

  - ### paintBackground

    public void paintBackground(TGraphics<Color,Font> g)
    Paints the background of the tooltip.
    Specified by:
      `paintBackground` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `g` - a Graphis2D object.

  - ### paintText

    public void paintText(TGraphics<Color,Font> g)
    Paints the values and the labels of the tooltip.
    Specified by:
      `paintText` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `g` -

  - ### getView

    protected TreeMapView<Component,N,Row,Column,Color,Font> getView()
    Gets the view associated with this tooltip.
    Returns:
      the view.

  - ### getNode

    public N getNode()
    Gets the current node that the tooltip should display information about.
    Specified by:
      `getNode` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Returns:
      the current node.

  - ### setNode

    public void setNode(N node)
    Sets the current node that the tooltip should display information about.
    Specified by:
      `setNode` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `node` - the node to dislay information about.

  - ### getPreferredWidth

    public int getPreferredWidth()
    Gets the preferred width of the tooltip.
    Specified by:
      `getPreferredWidth` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Returns:
      the preferred width.

  - ### setPreferredWidth

    public void setPreferredWidth(int width)
    Sets the preferred width of the tooltip.
    Specified by:
      `setPreferredWidth` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `width` - the preferred width.

  - ### getPopupLocation

    public com.macrofocus.geom.Point getPopupLocation()
    Specified by:
      `getPopupLocation` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`

  - ### getPopup

    public TreeMapPopup getPopup()
    Gets the popup or create one if one doesn't exist yet.
    Returns:
      a JidePopup component.

  - ### createPopup

    protected TreeMapPopup createPopup()
    Creates a popup.
    Returns:
      a JidePopup component.

  - ### showNode

    public void showNode(N node)
    Description copied from interface: `TreeMapToolTip`
    Shows the current node that the tooltip should display information about.
    Specified by:
      `showNode` in interface `TreeMapToolTip<N,Row,Column,Component,Color>`
    Parameters:
      `node` - the node to dislay information about.

  - ### getPreferredLocation

    public com.macrofocus.geom.Point getPreferredLocation(com.macrofocus.geom.Point p)
    Gets the preferred location of the tooltip relative to the TreeMapView.
    Parameters:
      `p` - the position of the mouse.
    Returns:
      the preferred location.

  - ### showPopup

    protected void showPopup(int x, int y)
    Shows the popup at the specified x and y coordinates.
    Parameters:
      `x` - the x position. It is screen position.
      `y` - the y position. It is screen position.

  - ### hidePopup

    protected void hidePopup()
    Hides the popup.