Browse Source

Pull request #15150: REPORT-138224 【fr-fbp回归】填报属性设置中,选中字段时的效果不正常

Merge in DESIGN/design from ~RENEKTON/design:fbp/master to fbp/master

* commit '28c9e9d3864f628048877bf9b5999082e9db6689':
  增加注释
  模板填报属性不能选中修复
fbp/master
Renekton-张世豪 2 months ago
parent
commit
ac8c0c3354
  1. 12
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java
  2. 16
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  3. 10
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

12
designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java

@ -84,6 +84,16 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
setHorizontalAlignment(SwingConstants.LEFT);
}
/**
* 是否选中修改背景
* @param isSelected 被选中
* @param columnClass 列类型
* @return 是否修改
*/
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected && columnClass != Boolean.class;
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Class<?> columnClass = table.getColumnClass(0);
@ -95,7 +105,7 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")),
UIManager.getBorder("Table.cellNoFocusBorder"));
}
if (isSelected && columnClass != Boolean.class) {
if (checkSelected(isSelected, columnClass)) {
selectionBackground = UIManager.getColor( "Table.selectionBackground");
} else {
selectionBackground = UIManager.getColor("Table.background");

16
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -1220,6 +1220,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
/*
@ -1245,6 +1250,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
/**
@ -1263,7 +1273,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
setSelected((value != null && ((Boolean) value).booleanValue()));
setUI(getUICheckBoxUI());
setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")));
setBackground(Color.WHITE);
if (isSelected) {
setBackground(UIManager.getColor( "Table.selectionBackground"));
} else {
setBackground(UIManager.getColor("Table.background"));
}
return this;
}
}

10
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -580,6 +580,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
private class ColumnRowGroupCellRenderer2 extends FineTableHeaderUI.TableRenderer {
@ -613,6 +618,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
}
}

Loading…
Cancel
Save