mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
FlatLaf: use constant for optional prefix
This commit is contained in:
@@ -52,6 +52,7 @@ public abstract class FlatLaf
|
|||||||
{
|
{
|
||||||
private static final String VARIABLE_PREFIX = "@";
|
private static final String VARIABLE_PREFIX = "@";
|
||||||
private static final String REF_PREFIX = VARIABLE_PREFIX + "@";
|
private static final String REF_PREFIX = VARIABLE_PREFIX + "@";
|
||||||
|
private static final String OPTIONAL_PREFIX = "?";
|
||||||
private static final String GLOBAL_PREFIX = "*.";
|
private static final String GLOBAL_PREFIX = "*.";
|
||||||
|
|
||||||
private BasicLookAndFeel base;
|
private BasicLookAndFeel base;
|
||||||
@@ -244,8 +245,8 @@ public abstract class FlatLaf
|
|||||||
value = value.substring( REF_PREFIX.length() );
|
value = value.substring( REF_PREFIX.length() );
|
||||||
|
|
||||||
boolean optional = false;
|
boolean optional = false;
|
||||||
if( value.startsWith( "?" ) ) {
|
if( value.startsWith( OPTIONAL_PREFIX ) ) {
|
||||||
value = value.substring( 1 );
|
value = value.substring( OPTIONAL_PREFIX.length() );
|
||||||
optional = true;
|
optional = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user