Browse Source

Merge pull request #653 in DESIGN/design from ~YAOH.WU/design:release/10.0 to release/10.0

* commit '8833f95adeb3e88365ef9f687da04f3c993352d6':
  REPORT-13194 处理一下可能出现的数组越界
final/10.0
yaoh.wu 6 years ago
parent
commit
bc15670681
  1. 7
      designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java

7
designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java

@ -100,10 +100,9 @@ public class CheckBoxTreeCellRenderer extends NullPanel implements TreeCellRende
Border border = treeCellRendererComponent.getBorder(); Border border = treeCellRendererComponent.getBorder();
setBorder(border); setBorder(border);
treeCellRendererComponent.setBorder(BorderFactory.createEmptyBorder()); treeCellRendererComponent.setBorder(BorderFactory.createEmptyBorder());
//todo 可能会发生数组越界,需要处理一下
if (getComponentCount() == 2) { remove((Component) this._actualTreeRenderer);
remove(1);
}
add(treeCellRendererComponent); add(treeCellRendererComponent);
} }

Loading…
Cancel
Save