Browse Source

REPORT-76564 设计器检查-国际化问题

release/11.0
obo 1 year ago
parent
commit
8880e07986
  1. 17
      designer-base/src/main/java/com/fr/design/components/table/TablePanel.java
  2. 1
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java

17
designer-base/src/main/java/com/fr/design/components/table/TablePanel.java

@ -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) {

1
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -361,6 +361,7 @@ public class EnvDetectorDialog extends JDialog {
}
EnvDetectorItem item = items.get(i);
tablePanel.updateCell(row, 2, new UILabel(item.getDescription()));
tablePanel.updateCellToolTip(row, 2, item.getDescription());
DetectorResult result = item.getResult();
int detectRow = currentDetectIndex + 1;

Loading…
Cancel
Save