return 50;
}
@Override
public String getToolTipText(MouseEvent event) {
Point mousePoint = event.getPoint();
Point panelIndex = getMatrix(mousePoint.x, mousePoint.y);
if (panelIndex.x != -1) {
ProgramPanel panel = mModel.getProgramPanel(panelIndex.x, panelIndex.y);
// calculate relative mouse coordinates
int currY = mLayout.getColumnStart(panelIndex.x);
for (int row = 0; row < panelIndex.y; row++) {
currY += mModel.getProgramPanel(panelIndex.x, row).getHeight();
}
final int panelX = mousePoint.x - panelIndex.x * mColumnWidth;
final int panelY = mousePoint.y - currY;
StringBuilder buffer = new StringBuilder();
String tooltip = panel.getToolTipText(panelX, panelY);
if (tooltip != null && tooltip.length() > 0) {
buffer.append(tooltip);
}
// if program is partially not visible then show the title as tooltip
final JViewport viewport = MainFrame.getInstance()
.getProgramTableScrollPane().getViewport();
Point viewPos = viewport.getViewPosition();
Dimension viewSize = viewport.getSize();
final Program program = panel.getProgram();
if ((currY < viewPos.y)
|| (panelIndex.x * mColumnWidth + panel.getTitleX() < viewPos.x)
|| ((panelIndex.x + 1) * mColumnWidth - 1 > viewPos.x