SwingX: fixed too wide border when using date picker as table cell editor (issue #24)

This commit is contained in:
Karl Tauber
2019-11-26 00:05:38 +01:00
parent 711c4dd2b5
commit c513c052fc
5 changed files with 143 additions and 58 deletions

View File

@@ -71,7 +71,7 @@ public class FlatBorder
try {
FlatUIUtils.setRenderingHints( g2 );
boolean isCellEditor = FlatUIUtils.isTableCellEditor( c );
boolean isCellEditor = isTableCellEditor( c );
float focusWidth = isCellEditor ? 0 : getFocusWidth();
float borderWidth = getBorderWidth( c );
float arc = isCellEditor ? 0 : getArc();
@@ -132,9 +132,13 @@ public class FlatBorder
return c.hasFocus();
}
protected boolean isTableCellEditor( Component c ) {
return FlatUIUtils.isTableCellEditor( c );
}
@Override
public Insets getBorderInsets( Component c, Insets insets ) {
boolean isCellEditor = FlatUIUtils.isTableCellEditor( c );
boolean isCellEditor = isTableCellEditor( c );
float ow = (isCellEditor ? 0 : getFocusWidth()) + getLineWidth();
insets = super.getBorderInsets( c, insets );