|
|
|
@ -160,9 +160,20 @@ public class TablePanel extends JPanel {
|
|
|
|
|
cellPanel.remove(0); |
|
|
|
|
} |
|
|
|
|
cellPanel.add(component); |
|
|
|
|
if(component instanceof UILabel) { |
|
|
|
|
cellPanel.setToolTipText(((UILabel)component).getText()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 为单元格Panel添加tooltip |
|
|
|
|
* |
|
|
|
|
* @param row 行数 |
|
|
|
|
* @param column 列数 |
|
|
|
|
* @param value tooltip值 |
|
|
|
|
*/ |
|
|
|
|
public void updateCellToolTip(int row, int column, String value) { |
|
|
|
|
int x = row - 1; |
|
|
|
|
int y = column - 1; |
|
|
|
|
JPanel cellPanel = this.cellPanels[x][y]; |
|
|
|
|
cellPanel.setToolTipText(value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void updateCell(int row, int column, String value) { |
|
|
|
|