PL-10693 Filter with invisible border has unusual caption

This commit is contained in:
Daniil Tsarev 2018-04-27 09:32:01 +04:00
parent 36d6df4e3e
commit 9367186d33

View File

@ -72,6 +72,7 @@ public class DesktopFilter extends DesktopAbstractComponent<JPanel> implements F
setWidth("100%");
delegate.addExpandedStateChangeListener(e -> fireExpandStateChange(e.isExpanded()));
delegate.setCaptionChangedListener(this::updateCaption);
}
@Override
@ -210,6 +211,12 @@ public class DesktopFilter extends DesktopAbstractComponent<JPanel> implements F
@Override
public void setCaption(String caption) {
delegate.setCaption(caption);
updateCaption(caption);
}
protected void updateCaption(String caption) {
((HasCaption) delegate.getLayout()).setCaption(caption);
}
@Override