mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 23:07:15 -06:00
Styling: support styling for recently merged changes
This commit is contained in:
@@ -139,6 +139,12 @@ public class FlatTableHeaderBorder
|
||||
}
|
||||
|
||||
protected boolean hideTrailingVerticalLine( JTableHeader header ) {
|
||||
if( header.getUI() instanceof FlatTableHeaderUI ) {
|
||||
FlatTableHeaderUI ui = (FlatTableHeaderUI) header.getUI();
|
||||
if( ui.showTrailingVerticalLine )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( showTrailingVerticalLine )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ public class FlatTableHeaderUI
|
||||
// for FlatTableHeaderBorder
|
||||
@Styleable protected Insets cellMargins;
|
||||
@Styleable protected Color separatorColor;
|
||||
/** @since 2 */ @Styleable protected boolean showTrailingVerticalLine;
|
||||
|
||||
// for FlatAscendingSortIcon and FlatDescendingSortIcon
|
||||
// (needs to be public because icon classes are in another package)
|
||||
|
||||
@@ -98,7 +98,7 @@ public class FlatTableUI
|
||||
{
|
||||
protected boolean showHorizontalLines;
|
||||
protected boolean showVerticalLines;
|
||||
/** @since 1.6 */ protected boolean showTrailingVerticalLine;
|
||||
/** @since 1.6 */ @Styleable protected boolean showTrailingVerticalLine;
|
||||
protected Dimension intercellSpacing;
|
||||
|
||||
@Styleable protected Color selectionBackground;
|
||||
|
||||
@@ -708,6 +708,7 @@ public class TestFlatStyleableInfo
|
||||
FlatTableUI ui = (FlatTableUI) c.getUI();
|
||||
|
||||
Map<String, Class<?>> expected = expectedMap(
|
||||
"showTrailingVerticalLine", boolean.class,
|
||||
"selectionBackground", Color.class,
|
||||
"selectionForeground", Color.class,
|
||||
"selectionInactiveBackground", Color.class,
|
||||
@@ -735,6 +736,7 @@ public class TestFlatStyleableInfo
|
||||
// FlatTableHeaderBorder
|
||||
"cellMargins", Insets.class,
|
||||
"separatorColor", Color.class,
|
||||
"showTrailingVerticalLine", boolean.class,
|
||||
|
||||
// FlatAscendingSortIcon and FlatDescendingSortIcon
|
||||
"arrowType", String.class,
|
||||
|
||||
@@ -806,6 +806,7 @@ public class TestFlatStyling
|
||||
JTable c = new JTable();
|
||||
FlatTableUI ui = (FlatTableUI) c.getUI();
|
||||
|
||||
ui.applyStyle( "showTrailingVerticalLine: true" );
|
||||
ui.applyStyle( "selectionBackground: #fff" );
|
||||
ui.applyStyle( "selectionForeground: #fff" );
|
||||
ui.applyStyle( "selectionInactiveBackground: #fff" );
|
||||
@@ -841,6 +842,7 @@ public class TestFlatStyling
|
||||
// FlatTableHeaderBorder
|
||||
ui.applyStyle( "cellMargins: 1,2,3,4" );
|
||||
ui.applyStyle( "separatorColor: #fff" );
|
||||
ui.applyStyle( "showTrailingVerticalLine: true" );
|
||||
|
||||
// FlatAscendingSortIcon and FlatDescendingSortIcon
|
||||
ui.applyStyle( "arrowType: chevron" );
|
||||
|
||||
Reference in New Issue
Block a user