Package com.macrofocus.treemap
Class AbstractTreeMapToolTip<N,Row,Column,Component,Color,Font>
- java.lang.Object
-
- com.macrofocus.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 java.lang.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.macrofocus.treemap.TreeMapToolTip
TreeMapToolTip.ToolTipType
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeMapToolTip(TreeMapView<Component,N,Row,Column,Color,Font> view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TreeMapPopup
createPopup()
Creates a popup.protected com.macrofocus.igraphics.CPColor<Color>
getBorderColor()
java.awt.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.java.awt.Point
getPopupLocation()
java.awt.Point
getPreferredLocation(java.awt.Point p)
Gets the preferred location of the tooltip relative to the TreeMapView.java.awt.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.macrofocus.treemap.TreeMapToolTip
getHeight, getPreferredLocation, getType, getWidth, setSize, setType
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
getRenderer
public ToolTipTreeMapRenderer getRenderer()
-
setRenderer
public void setRenderer(ToolTipTreeMapRenderer renderer)
-
getInsets
public java.awt.Insets getInsets()
-
getPreferredSize
public java.awt.Dimension getPreferredSize(TGraphics<Color,Font> g)
- Specified by:
getPreferredSize
in interfaceTreeMapToolTip<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 interfaceTreeMapToolTip<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.
-
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.
-
setNode
public void setNode(N node)
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 java.awt.Point getPopupLocation()
- Specified by:
getPopupLocation
in interfaceTreeMapToolTip<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.
-
getPreferredLocation
public java.awt.Point getPreferredLocation(java.awt.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.
-
-