Package com.macrofocus.treemap.swing
Class SwingTreeMapToolTip<N,Row,Column>
- java.lang.Object
-
- com.macrofocus.treemap.AbstractTreeMapToolTip<N,Row,Column,javax.swing.JComponent,java.awt.Color,java.awt.Font>
-
- com.macrofocus.treemap.swing.SwingTreeMapToolTip<N,Row,Column>
-
- Type Parameters:
N
-
- All Implemented Interfaces:
TreeMapToolTip<N,Row,Column,java.awt.Color,java.awt.Font>
public class SwingTreeMapToolTip<N,Row,Column> extends AbstractTreeMapToolTip<N,Row,Column,javax.swing.JComponent,java.awt.Color,java.awt.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 com.macrofocus.treemap.TreeMapToolTip
TreeMapToolTip.ToolTipType
-
-
Constructor Summary
Constructors Constructor Description SwingTreeMapToolTip(TreeMapView<javax.swing.JComponent,N,Row,Column,java.awt.Color,java.awt.Font> view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TreeMapPopup
createPopup()
Creates a popup.int
getHeight()
javax.swing.JComponent
getNativeComponent()
java.awt.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<java.awt.Color,java.awt.Font> g)
Paints the background of the tooltip.void
setBorder(javax.swing.border.Border border)
void
setRedispatchMouseEvent(boolean redispatchMouseEvent)
Controls whether the mouse event on the tooltip should be redispatched to the TreeMapView.void
setSize(java.awt.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 com.macrofocus.treemap.AbstractTreeMapToolTip
getBorderColor, getInsets, getNode, getPopup, getPopupLocation, getPreferredLocation, getPreferredSize, getPreferredWidth, getRenderer, getView, hidePopup, paintText, setNode, setPreferredWidth, setRenderer, showPopup
-
-
-
-
Constructor Detail
-
SwingTreeMapToolTip
public SwingTreeMapToolTip(TreeMapView<javax.swing.JComponent,N,Row,Column,java.awt.Color,java.awt.Font> view)
-
-
Method Detail
-
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(javax.swing.border.Border border)
-
setVisible
public void setVisible(boolean visible)
-
setSize
public void setSize(java.awt.Dimension d)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getNativeComponent
public javax.swing.JComponent getNativeComponent()
-
paintBackground
public void paintBackground(TGraphics<java.awt.Color,java.awt.Font> g)
Paints the background of the tooltip.- Specified by:
paintBackground
in interfaceTreeMapToolTip<N,Row,Column,java.awt.Color,java.awt.Font>
- Overrides:
paintBackground
in classAbstractTreeMapToolTip<N,Row,Column,javax.swing.JComponent,java.awt.Color,java.awt.Font>
- Parameters:
g
- a Graphis2D object.
-
getPreferredLocation
public java.awt.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 interfaceTreeMapToolTip<N,Row,Column,java.awt.Color,java.awt.Font>
- Overrides:
showNode
in classAbstractTreeMapToolTip<N,Row,Column,javax.swing.JComponent,java.awt.Color,java.awt.Font>
- Parameters:
node
- the node to dislay information about.
-
createPopup
protected TreeMapPopup createPopup()
Creates a popup.- Overrides:
createPopup
in classAbstractTreeMapToolTip<N,Row,Column,javax.swing.JComponent,java.awt.Color,java.awt.Font>
- Returns:
- a JidePopup component.
-
-