Package com.treemap.swing
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 ClassesNested classes/interfaces inherited from interface com.treemap.TreeMapToolTip
TreeMapToolTip.ToolTipType
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TreeMapPopup
Creates a popup.int
com.macrofocus.geom.Point
Gets the preferred location of the tooltip relative to the TreeMapView.getType()
Gets the type of tooltip.int
getWidth()
void
Paints the background of the tooltip.void
void
setRedispatchMouseEvent
(boolean redispatchMouseEvent) Controls whether the mouse event on the tooltip should be redispatched to the TreeMapView.void
void
Sets the type of the tooltip.void
setVisible
(boolean visible) void
Shows the current node that the tooltip should display information about.Methods inherited from class com.treemap.AbstractTreeMapToolTip
getBorderColor, getInsets, getNode, getPopup, getPopupLocation, getPreferredLocation, getPreferredSize, getPreferredWidth, getRenderer, getView, hidePopup, paintText, setNode, setPreferredWidth, setRenderer, showPopup
-
Constructor Details
-
SwingTreeMapToolTip
-
-
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
-
setVisible
public void setVisible(boolean visible) -
setSize
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getNativeComponent
-
paintBackground
Paints the background of the tooltip.- Specified by:
paintBackground
in interfaceTreeMapToolTip<N,
Row, Column, Color, Font> - Overrides:
paintBackground
in classAbstractTreeMapToolTip<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
Gets the type of tooltip.- Returns:
- the type of the tooltip.
-
setType
Sets the type of the tooltip.- Parameters:
type
- the tooltip type.
-
showNode
Description copied from interface:TreeMapToolTip
Shows the current node that the tooltip should display information about.- Specified by:
showNode
in interfaceTreeMapToolTip<N,
Row, Column, Color, Font> - Overrides:
showNode
in classAbstractTreeMapToolTip<N,
Row, Column, JComponent, Color, Font> - Parameters:
node
- the node to dislay information about.
-
createPopup
Creates a popup.- Overrides:
createPopup
in classAbstractTreeMapToolTip<N,
Row, Column, JComponent, Color, Font> - Returns:
- a JidePopup component.
-