[ 1855851 ] Propose New Look for Collapseable Field Group

- fix border issue when collapsed.
This commit is contained in:
Heng Sin Low 2007-12-27 09:24:17 +00:00
parent afaace6001
commit a7274b023a
1 changed files with 7 additions and 0 deletions

View File

@ -191,6 +191,13 @@ public class CollapsiblePanel extends JPanel {
public void paintBorder(Component c, Graphics g, int x, int y, public void paintBorder(Component c, Graphics g, int x, int y,
int width, int height) { int width, int height) {
// if the collapsible is collapsed, we do not want its border to be
// painted.
if (c instanceof JXCollapsiblePane) {
if (((JXCollapsiblePane) c).isCollapsed()) {
return;
}
}
g.setColor(getSeparatorColor()); g.setColor(getSeparatorColor());
if (isFirst(c)) { if (isFirst(c)) {
g.drawLine(x, y + 2, x + width, y + 2); g.drawLine(x, y + 2, x + width, y + 2);