# Class SwingTreeMapToolTip<N,Row,Column>

java.lang.Object
com.treemap.AbstractTreeMapToolTip<N, Row, Column, JComponent, Color, Font>
com.treemap.swing.SwingTreeMapToolTip<N,Row,Column>

Type Parameters:
  `N` -

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

public class SwingTreeMapToolTip<N,Row,Column> extends AbstractTreeMapToolTip<N, Row, Column, JComponent, Color, Font>
Default implementation of a tooltip using JidePopup as a container.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected class`
  `SwingTreeMapToolTip.MouseRedispatcher`

  ### Nested classes/interfaces inherited from interface TreeMapToolTip

  `TreeMapToolTip.ToolTipType`

- ## Field Summary

  ### Fields inherited from class AbstractTreeMapToolTip

  `leftShift, node, popup, topShift, view`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TreeMapPopup`
  `createPopup()`
  Creates a popup.
  `int`
  `getHeight()`
  `JComponent`
  `getNativeComponent()`
  `com.macrofocus.geom.Point`
  `getPreferredLocation()`
  Gets the preferred location of the tooltip relative to the TreeMapView.
  `TreeMapToolTip.ToolTipType`
  `getType()`
  Gets the type of tooltip.
  `int`
  `getWidth()`
  `void`
  `paintBackground(TGraphics<Color,Font> g)`
  Paints the background of the tooltip.
  `void`
  `setBorder(Border border)`
  `void`
  `setRedispatchMouseEvent(boolean redispatchMouseEvent)`
  Controls whether the mouse event on the tooltip should be redispatched to the TreeMapView.
  `void`
  `setSize(Dimension d)`
  `void`
  `setType(TreeMapToolTip.ToolTipType type)`
  Sets the type of the tooltip.
  `void`
  `setVisible(boolean visible)`
  `void`
  `showNode(N node)`
  Shows the current node that the tooltip should display information about.

  ### Methods inherited from class AbstractTreeMapToolTip

  `getBorderColor, getInsets, getNode, getPopup, getPopupLocation, getPreferredLocation, getPreferredSize, getPreferredWidth, getRenderer, getView, hidePopup, paintText, setNode, setPreferredWidth, setRenderer, showPopup`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### SwingTreeMapToolTip

    public SwingTreeMapToolTip(TreeMapView<JComponent, N, Row, Column, Color, Font> view)

- ## Method Details

  - ### setRedispatchMouseEvent

    public void setRedispatchMouseEvent(boolean redispatchMouseEvent)
    Controls whether the mouse event on the tooltip should be redispatched to the TreeMapView.
    Parameters:
      `redispatchMouseEvent` - true to redispatch all the mouse events, false otherwise.

  - ### setBorder

    public void setBorder(Border border)

  - ### setVisible

    public void setVisible(boolean visible)

  - ### setSize

    public void setSize(Dimension d)

  - ### getWidth

    public int getWidth()

  - ### getHeight

    public int getHeight()

  - ### getNativeComponent

    public JComponent getNativeComponent()

  - ### paintBackground

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

  - ### getPreferredLocation

    public com.macrofocus.geom.Point getPreferredLocation()
    Gets the preferred location of the tooltip relative to the TreeMapView.
    Returns:
      the preferred location

  - ### getType

    public TreeMapToolTip.ToolTipType getType()
    Gets the type of tooltip.
    Returns:
      the type of the tooltip.

  - ### setType

    public void setType(TreeMapToolTip.ToolTipType type)
    Sets the type of the tooltip.
    Parameters:
      `type` - the tooltip type.

  - ### 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,Color,Font>`
    Overrides:
      `showNode` in class `AbstractTreeMapToolTip<N, Row, Column, JComponent, Color, Font>`
    Parameters:
      `node` - the node to dislay information about.

  - ### createPopup

    protected TreeMapPopup createPopup()
    Creates a popup.
    Overrides:
      `createPopup` in class `AbstractTreeMapToolTip<N, Row, Column, JComponent, Color, Font>`
    Returns:
      a JidePopup component.