Browse Source

REPORT-76174 【迭代】【数据连接面板为空】数据表搜索框-交互问题

【问题原因】1. 开发的时候没做这个TextField鼠标悬浮变色的功能;2. 部分代码质量问题
【改动思路】1. 加上悬浮变色边框的逻辑;2. 代码质量问题修改
【review建议】无
feature/x
Yvan 2 years ago
parent
commit
cc491a24fe
  1. 15
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 13
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/loading/TableDataLoadingPane.java

15
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -1023,19 +1023,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
if (TableDataAuthHelper.needCheckAuthWhenEdit(wrapper.getTableData())) {
// 先打开一个Loading面板
TableDataLoadingPane loadingPane = new TableDataLoadingPane();
BasicDialog loadingDialog = loadingPane.showLargeWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), new DialogActionAdapter() {
@Override
public void doOk() {
super.doOk();
}
@Override
public void doCancel() {
super.doCancel();
}
});
loadingDialog.setVisible(true);
BasicDialog loadingDialog = loadingPane.showLargeWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), null);
// 查询权限
new SwingWorker<Boolean, Void>() {
@Override
@ -1063,6 +1051,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
}
}
}.execute();
loadingDialog.setVisible(true);
} else {
// 无需检查权限时,直接打开数据库查询编辑面板
//下面创建creatTableDataPane后会直接populate,所以populate时不能用后设置的一些参数,比如name

13
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -166,6 +166,19 @@ public class ConnectionTableProcedurePane extends BasicPane {
searchField.setBorderPainted(false);
searchField.setPlaceholder(Toolkit.i18nText("Fine-Design_Basic_Table_Search"));
searchField.getDocument().addDocumentListener(searchListener);
searchField.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
super.mouseEntered(e);
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.CHECKBOX_HOVER_SELECTED));
}
@Override
public void mouseExited(MouseEvent e) {
super.mouseExited(e);
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
}
});
// 搜索图标
UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/loading/TableDataLoadingPane.java

@ -49,6 +49,6 @@ public class TableDataLoadingPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return "数据集查询";
return Toolkit.i18nText("Fine-Design_Basic_DS-Database_Query");
}
}

Loading…
Cancel
Save