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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TreeMapPopupCreates a popup.protected com.macrofocus.igraphics.CPColor<Color> com.macrofocus.igraphics.InsetsgetNode()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.Pointcom.macrofocus.geom.PointgetPreferredLocation(com.macrofocus.geom.Point p) Gets the preferred location of the tooltip relative to the TreeMapView.intGets the preferred width of the tooltip.getView()Gets the view associated with this tooltip.protected voidHides the popup.voidPaints the background of the tooltip.voidPaints the values and the labels of the tooltip.voidSets the current node that the tooltip should display information about.voidsetPreferredWidth(int width) Sets the preferred width of the tooltip.voidsetRenderer(ToolTipTreeMapRenderer renderer) voidShows the current node that the tooltip should display information about.protected voidshowPopup(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, waitMethods 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:
getPreferredSizein interfaceTreeMapToolTip<N,Row, Column, Component, Color> - Parameters:
g-
-
getBorderColor
-
paintBackground
Paints the background of the tooltip.- Specified by:
paintBackgroundin 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:
getPreferredWidthin 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:
setPreferredWidthin interfaceTreeMapToolTip<N,Row, Column, Component, Color> - Parameters:
width- the preferred width.
-
getPopupLocation
public com.macrofocus.geom.Point getPopupLocation()- Specified by:
getPopupLocationin 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:TreeMapToolTipShows 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.
-