mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
TabbedPane:
- added styling support for properties added in PR #343 - updated change log
This commit is contained in:
@@ -46,6 +46,7 @@ FlatLaf Change Log
|
|||||||
incompatible changes in FlatLaf properties files.
|
incompatible changes in FlatLaf properties files.
|
||||||
- Slider: Support specifying width of thumb border (see UI value
|
- Slider: Support specifying width of thumb border (see UI value
|
||||||
`Slider.thumbBorderWidth`).
|
`Slider.thumbBorderWidth`).
|
||||||
|
- TabbedPane: Optionally paint selected tab as card. (PR #343)
|
||||||
- Added more color functions to class `ColorFunctions` for easy use in
|
- Added more color functions to class `ColorFunctions` for easy use in
|
||||||
applications: `lighten()`, `darken()`, `saturate()`, `desaturate()`, `spin()`,
|
applications: `lighten()`, `darken()`, `saturate()`, `desaturate()`, `spin()`,
|
||||||
`tint()`, `shade()` and `luma()`.
|
`tint()`, `shade()` and `luma()`.
|
||||||
|
|||||||
@@ -209,14 +209,14 @@ public class FlatTabbedPaneUI
|
|||||||
@Styleable protected int maximumTabWidth;
|
@Styleable protected int maximumTabWidth;
|
||||||
@Styleable protected int tabHeight;
|
@Styleable protected int tabHeight;
|
||||||
@Styleable protected int tabSelectionHeight;
|
@Styleable protected int tabSelectionHeight;
|
||||||
/** @since 2 */ protected int cardTabSelectionHeight;
|
/** @since 2 */ @Styleable protected int cardTabSelectionHeight;
|
||||||
@Styleable protected int contentSeparatorHeight;
|
@Styleable protected int contentSeparatorHeight;
|
||||||
@Styleable protected boolean showTabSeparators;
|
@Styleable protected boolean showTabSeparators;
|
||||||
@Styleable protected boolean tabSeparatorsFullHeight;
|
@Styleable protected boolean tabSeparatorsFullHeight;
|
||||||
@Styleable protected boolean hasFullBorder;
|
@Styleable protected boolean hasFullBorder;
|
||||||
@Styleable protected boolean tabsOpaque = true;
|
@Styleable protected boolean tabsOpaque = true;
|
||||||
|
|
||||||
private int tabType;
|
@Styleable(type=String.class) private int tabType;
|
||||||
@Styleable(type=String.class) private int tabsPopupPolicy;
|
@Styleable(type=String.class) private int tabsPopupPolicy;
|
||||||
@Styleable(type=String.class) private int scrollButtonsPolicy;
|
@Styleable(type=String.class) private int scrollButtonsPolicy;
|
||||||
@Styleable(type=String.class) private int scrollButtonsPlacement;
|
@Styleable(type=String.class) private int scrollButtonsPlacement;
|
||||||
@@ -638,6 +638,7 @@ public class FlatTabbedPaneUI
|
|||||||
|
|
||||||
if( value instanceof String ) {
|
if( value instanceof String ) {
|
||||||
switch( key ) {
|
switch( key ) {
|
||||||
|
case "tabType": value = parseTabType( (String) value ); break;
|
||||||
case "tabsPopupPolicy": value = parseTabsPopupPolicy( (String) value ); break;
|
case "tabsPopupPolicy": value = parseTabsPopupPolicy( (String) value ); break;
|
||||||
case "scrollButtonsPolicy": value = parseScrollButtonsPolicy( (String) value ); break;
|
case "scrollButtonsPolicy": value = parseScrollButtonsPolicy( (String) value ); break;
|
||||||
case "scrollButtonsPlacement": value = parseScrollButtonsPlacement( (String) value ); break;
|
case "scrollButtonsPlacement": value = parseScrollButtonsPlacement( (String) value ); break;
|
||||||
|
|||||||
@@ -685,12 +685,14 @@ public class TestFlatStyleableInfo
|
|||||||
"maximumTabWidth", int.class,
|
"maximumTabWidth", int.class,
|
||||||
"tabHeight", int.class,
|
"tabHeight", int.class,
|
||||||
"tabSelectionHeight", int.class,
|
"tabSelectionHeight", int.class,
|
||||||
|
"cardTabSelectionHeight", int.class,
|
||||||
"contentSeparatorHeight", int.class,
|
"contentSeparatorHeight", int.class,
|
||||||
"showTabSeparators", boolean.class,
|
"showTabSeparators", boolean.class,
|
||||||
"tabSeparatorsFullHeight", boolean.class,
|
"tabSeparatorsFullHeight", boolean.class,
|
||||||
"hasFullBorder", boolean.class,
|
"hasFullBorder", boolean.class,
|
||||||
"tabsOpaque", boolean.class,
|
"tabsOpaque", boolean.class,
|
||||||
|
|
||||||
|
"tabType", String.class,
|
||||||
"tabsPopupPolicy", String.class,
|
"tabsPopupPolicy", String.class,
|
||||||
"scrollButtonsPolicy", String.class,
|
"scrollButtonsPolicy", String.class,
|
||||||
"scrollButtonsPlacement", String.class,
|
"scrollButtonsPlacement", String.class,
|
||||||
|
|||||||
@@ -849,12 +849,14 @@ public class TestFlatStyling
|
|||||||
ui.applyStyle( "maximumTabWidth: 100" );
|
ui.applyStyle( "maximumTabWidth: 100" );
|
||||||
ui.applyStyle( "tabHeight: 30" );
|
ui.applyStyle( "tabHeight: 30" );
|
||||||
ui.applyStyle( "tabSelectionHeight: 3" );
|
ui.applyStyle( "tabSelectionHeight: 3" );
|
||||||
|
ui.applyStyle( "cardTabSelectionHeight: 2" );
|
||||||
ui.applyStyle( "contentSeparatorHeight: 1" );
|
ui.applyStyle( "contentSeparatorHeight: 1" );
|
||||||
ui.applyStyle( "showTabSeparators: false" );
|
ui.applyStyle( "showTabSeparators: false" );
|
||||||
ui.applyStyle( "tabSeparatorsFullHeight: false" );
|
ui.applyStyle( "tabSeparatorsFullHeight: false" );
|
||||||
ui.applyStyle( "hasFullBorder: false" );
|
ui.applyStyle( "hasFullBorder: false" );
|
||||||
ui.applyStyle( "tabsOpaque: false" );
|
ui.applyStyle( "tabsOpaque: false" );
|
||||||
|
|
||||||
|
ui.applyStyle( "tabType: card" );
|
||||||
ui.applyStyle( "tabsPopupPolicy: asNeeded" );
|
ui.applyStyle( "tabsPopupPolicy: asNeeded" );
|
||||||
ui.applyStyle( "scrollButtonsPolicy: asNeeded" );
|
ui.applyStyle( "scrollButtonsPolicy: asNeeded" );
|
||||||
ui.applyStyle( "scrollButtonsPlacement: both" );
|
ui.applyStyle( "scrollButtonsPlacement: both" );
|
||||||
|
|||||||
Reference in New Issue
Block a user