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
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TreeMapPopup
Creates a popup.protected com.macrofocus.igraphics.CPColor<Color>
com.macrofocus.igraphics.Insets
getNode()
Gets the current node that the tooltip should display information about.getPopup()
Gets the popup or create one if one doesn't exist yet.com.macrofocus.geom.Point
com.macrofocus.geom.Point
getPreferredLocation
(com.macrofocus.geom.Point p) Gets the preferred location of the tooltip relative to the TreeMapView.int
Gets the preferred width of the tooltip.getView()
Gets the view associated with this tooltip.protected void
Hides the popup.void
Paints the background of the tooltip.void
Paints the values and the labels of the tooltip.void
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
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
-
node
-
popup
-
topShift
protected static final int topShift- See Also:
-
leftShift
protected static final int leftShift- See Also:
-
-
Constructor Details
-
AbstractTreeMapToolTip
-
-
Method Details
-
getRenderer
-
setRenderer
-
getInsets
public com.macrofocus.igraphics.Insets getInsets() -
getPreferredSize
- Specified by:
getPreferredSize
in interfaceTreeMapToolTip<N,
Row, Column, Component, Color> - Parameters:
g
-
-
getBorderColor
-
paintBackground
Paints the background of the tooltip.- Specified by:
paintBackground
in interfaceTreeMapToolTip<N,
Row, Column, Component, Color> - Parameters:
g
- a Graphis2D object.
-
paintText
Paints the values and the labels of the tooltip. -
getView
Gets the view associated with this tooltip.- Returns:
- the view.
-
getNode
Gets the current node that the tooltip should display information about. -
setNode
Sets the current node that the tooltip should display information about. -
getPreferredWidth
public int getPreferredWidth()Gets the preferred width of the tooltip.- Specified by:
getPreferredWidth
in interfaceTreeMapToolTip<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 interfaceTreeMapToolTip<N,
Row, Column, Component, Color> - Parameters:
width
- the preferred width.
-
getPopupLocation
public com.macrofocus.geom.Point getPopupLocation()- Specified by:
getPopupLocation
in interfaceTreeMapToolTip<N,
Row, Column, Component, Color>
-
getPopup
Gets the popup or create one if one doesn't exist yet.- Returns:
- a JidePopup component.
-
createPopup
Creates a popup.- Returns:
- a JidePopup component.
-
showNode
Description copied from interface:TreeMapToolTip
Shows the current node that the tooltip should display 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.
-