JIDE 3.5.15

com.jidesoft.tooltip
Class TableRowExpandedTip

java.lang.Object
  extended by com.jidesoft.tooltip.ExpandedTip<JTable>
      extended by com.jidesoft.tooltip.TableRowExpandedTip

public class TableRowExpandedTip
extends ExpandedTip<JTable>

TableRowExpandedTip enables the ExpandedTip feature for JTable.

Just so you know, there could be two different ways to use expanded tip for the JTable. One way is to show the whole row which is how this class implemented. The other way, which we haven't implemented yet, is to show a cell when the cell is not fully visible.

Since:
3.3.0

Field Summary
 
Fields inherited from class com.jidesoft.tooltip.ExpandedTip
_component, CLIENT_PROPERTY_EXPANDED_TIP
 
Constructor Summary
TableRowExpandedTip(JTable table)
           
 
Method Summary
 Component getComponent(int index)
          Gets the target component.
 Rectangle getRowBounds(int index)
          Gets the bounds of the image that will be put on the tip.
 Rectangle getVisibleRect(int index)
          Gets the visible rect of the component.
 void hideTip()
           
 boolean isShowHeaderTip()
          Gets the flag indicating if the header's expanded tip should be displayed as well when the row's expanded tip is showing.
 int rowAtPoint(Point point)
          Gets the row index or the node index on the location.
 void setShowHeaderTip(boolean showHeaderTip)
          Sets the flag indicating if the header's expanded tip should be displayed as well when the row's expanded tip is showing.
 void showTip()
           
 void uninstall()
           
 
Methods inherited from class com.jidesoft.tooltip.ExpandedTip
createImage, createToolTipImage, fillBackground, getComponent, getExpandedTip, handleSelectionChange, handleSelectionChange, paintTipImage, setWindowShape, shouldDrawBorder, updateCurrentSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableRowExpandedTip

public TableRowExpandedTip(JTable table)
Method Detail

uninstall

public void uninstall()
Overrides:
uninstall in class ExpandedTip<JTable>

getComponent

public Component getComponent(int index)
Description copied from class: ExpandedTip
Gets the target component. This component contains the image that will be put on the tip. The area of the image is returned in the ExpandedTip.getRowBounds(int). What we will do is to take a capture of the image at the bounds on the component and copy it to the tip component.

Overrides:
getComponent in class ExpandedTip<JTable>
Parameters:
index - the index of the row or node.
Returns:
the component.

getRowBounds

public Rectangle getRowBounds(int index)
Description copied from class: ExpandedTip
Gets the bounds of the image that will be put on the tip. The position is relative to the component returned from ExpandedTip.getComponent(int). The bounds should cover the row or the node. We will calculate it so that only the invisible area is shown on the tip component.

Specified by:
getRowBounds in class ExpandedTip<JTable>
Parameters:
index - the index of the row or node.
Returns:
the bounds.

getVisibleRect

public Rectangle getVisibleRect(int index)
Description copied from class: ExpandedTip
Gets the visible rect of the component.

Overrides:
getVisibleRect in class ExpandedTip<JTable>
Parameters:
index - the index of the row or node
Returns:
the visible rect of the component.

rowAtPoint

public int rowAtPoint(Point point)
Description copied from class: ExpandedTip
Gets the row index or the node index on the location.

Specified by:
rowAtPoint in class ExpandedTip<JTable>
Parameters:
point - the location.
Returns:
the index of the row or node.

hideTip

public void hideTip()
Overrides:
hideTip in class ExpandedTip<JTable>

showTip

public void showTip()
Overrides:
showTip in class ExpandedTip<JTable>

isShowHeaderTip

public boolean isShowHeaderTip()
Gets the flag indicating if the header's expanded tip should be displayed as well when the row's expanded tip is showing.

Returns:
true if the header's expanded tip should be displayed. Otherwise false.
Since:
3.3.7
See Also:
setShowHeaderTip(boolean)

setShowHeaderTip

public void setShowHeaderTip(boolean showHeaderTip)
Sets the flag indicating if the header's expanded tip should be displayed as well when the row's expanded tip is showing.

By default, the flag is true. This flag only take effect if the ExpandedTip is already installed over the table header.

Parameters:
showHeaderTip - the flag
Since:
3.3.7

JIDE 3.5.15