changed multi-line javadoc since tags to single-line

This commit is contained in:
Karl Tauber
2021-09-25 13:27:26 +02:00
parent d756041b06
commit cce91ea16d
56 changed files with 148 additions and 432 deletions

View File

@@ -582,9 +582,7 @@ public abstract class FlatLaf
return (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font );
}
/**
* @since 1.1
*/
/** @since 1.1 */
public static ActiveValue createActiveFontValue( float scaleFactor ) {
return new ActiveFont( scaleFactor );
}

View File

@@ -40,9 +40,7 @@ public class FlatCapsLockIcon
super( 16, 16, UIManager.getColor( "PasswordField.capsLockIconColor" ) );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
Object oldValue;
switch( key ) {

View File

@@ -132,16 +132,12 @@ public class FlatCheckBoxIcon
super( ICON_SIZE, ICON_SIZE, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -49,16 +49,12 @@ public class FlatCheckBoxMenuItemIcon
super( 15, 15, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -51,16 +51,12 @@ public class FlatClearIcon
super( 16, 16, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -74,16 +74,12 @@ public class FlatHelpButtonIcon
super( 0, 0, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -51,16 +51,12 @@ public class FlatMenuArrowIcon
super( 6, 10, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -49,16 +49,12 @@ public class FlatSearchIcon
super( 16, 16, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -66,16 +66,12 @@ public class FlatTabbedPaneCloseIcon
super( 16, 16, null );
}
/**
* @since 2
*/
/** @since 2 */
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}

View File

@@ -95,9 +95,7 @@ public class FlatArrowButton
}
}
/**
* @since 2
*/
/** @since 2 */
public void updateStyle( String type, Color foreground, Color disabledForeground,
Color hoverForeground, Color hoverBackground, Color pressedForeground, Color pressedBackground )
{

View File

@@ -80,17 +80,13 @@ public class FlatBorder
@Styleable(dot=true) protected Color warningFocusedBorderColor = UIManager.getColor( "Component.warning.focusedBorderColor" );
@Styleable(dot=true) protected Color customBorderColor = UIManager.getColor( "Component.custom.borderColor" );
/**
* @since 2
*/
/** @since 2 */
@Override
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -96,9 +96,7 @@ public class FlatButtonBorder
paintToolBarFocus( c, g, x, y, width, height );
}
/**
* @since 1.4
*/
/** @since 1.4 */
protected void paintToolBarFocus( Component c, Graphics g, int x, int y, int width, int height ) {
Graphics2D g2 = (Graphics2D) g.create();
try {

View File

@@ -267,17 +267,13 @@ public class FlatButtonUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( AbstractButton b, Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style,
(key, value) -> applyStyleProperty( b, key, value ) );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( AbstractButton b, String key, Object value ) {
if( key.startsWith( "help." ) ) {
if( !(helpButtonIcon instanceof FlatHelpButtonIcon) )
@@ -297,9 +293,7 @@ public class FlatButtonUI
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, b, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this, c.getBorder() );

View File

@@ -144,9 +144,7 @@ public class FlatCaret
}
}
/**
* @since 1.4
*/
/** @since 1.4 */
public void scrollCaretToVisible() {
JTextComponent c = getComponent();
if( c == null || c.getUI() == null )

View File

@@ -101,16 +101,12 @@ public class FlatCheckBoxMenuItemUI
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
try {
return renderer.applyStyleProperty( key, value );
@@ -131,9 +127,7 @@ public class FlatCheckBoxMenuItemUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, menuItem, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatMenuItemUI.getStyleableInfos( renderer );

View File

@@ -48,9 +48,7 @@ public class FlatCheckBoxUI
: new FlatCheckBoxUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatCheckBoxUI( boolean shared ) {
super( shared );
}

View File

@@ -438,9 +438,7 @@ public class FlatComboBoxUI
return new FlatComboBoxButton();
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
Insets oldPadding = padding;
int oldEditorColumns = editorColumns;
@@ -459,9 +457,7 @@ public class FlatComboBoxUI
((JTextField)editor).setColumns( editorColumns );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
// BasicComboBoxUI
if( key.equals( "padding" ) ) {
@@ -475,9 +471,7 @@ public class FlatComboBoxUI
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, comboBox, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = new LinkedHashMap<>();
@@ -673,9 +667,7 @@ public class FlatComboBoxUI
return parentParent != null && !comboBox.getBackground().equals( parentParent.getBackground() );
}
/**
* @since 1.3
*/
/** @since 1.3 */
public static boolean isPermanentFocusOwner( JComboBox<?> comboBox ) {
if( comboBox.isEditable() ) {
Component editorComponent = comboBox.getEditor().getEditorComponent();

View File

@@ -90,9 +90,7 @@ public class FlatDropShadowBorder
Math.max( shadowInsets.top, shadowInsets.bottom ) );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Object applyStyleProperty( String key, Object value ) {
Object oldValue = FlatStylingSupport.applyToAnnotatedObject( this, key, value );
@@ -103,9 +101,7 @@ public class FlatDropShadowBorder
return oldValue;
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos() {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -172,9 +172,7 @@ public class FlatEditorPaneUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
@@ -184,16 +182,12 @@ public class FlatEditorPaneUI
updateBackground();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, getComponent(), key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -152,25 +152,19 @@ public class FlatInternalFrameUI
super.createPropertyChangeListener() );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, frame, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, frame.getBorder() );
@@ -283,9 +277,7 @@ public class FlatInternalFrameUI
//---- class FlatBorderListener -------------------------------------------
/**
* @since 1.6
*/
/** @since 1.6 */
protected class FlatBorderListener
extends BorderListener
{

View File

@@ -72,9 +72,7 @@ public class FlatLabelUI
: new FlatLabelUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatLabelUI( boolean shared ) {
this.shared = shared;
}
@@ -134,24 +132,18 @@ public class FlatLabelUI
super.propertyChange( e );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( JLabel c, Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style,
(key, value) -> applyStyleProperty( c, key, value ) );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( JLabel c, String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, c, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -159,9 +159,7 @@ public class FlatListUI
};
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
Color oldSelectionBackground = selectionBackground;
Color oldSelectionForeground = selectionForeground;
@@ -189,16 +187,12 @@ public class FlatListUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, list, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -40,9 +40,7 @@ public class FlatMenuBarBorder
{
@Styleable protected Color borderColor = UIManager.getColor( "MenuBar.borderColor" );
/**
* @since 2
*/
/** @since 2 */
@Override
public Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );

View File

@@ -138,25 +138,19 @@ public class FlatMenuBarUI
map.put( "takeFocus", new TakeFocus() );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, menuBar, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, menuBar.getBorder() );

View File

@@ -102,9 +102,7 @@ public class FlatMenuItemRenderer
this.minimumIconSize = (minimumIconSize != null) ? minimumIconSize : new Dimension( 16, 16 );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
// style icon
if( key.startsWith( "icon." ) || key.equals( "selectionForeground" ) ) {
@@ -150,9 +148,7 @@ public class FlatMenuItemRenderer
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
public Map<String, Class<?>> getStyleableInfos() {
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );
if( checkIcon instanceof FlatCheckBoxMenuItemIcon )

View File

@@ -102,16 +102,12 @@ public class FlatMenuItemUI
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
try {
return renderer.applyStyleProperty( key, value );
@@ -132,9 +128,7 @@ public class FlatMenuItemUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, menuItem, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return getStyleableInfos( renderer );

View File

@@ -148,16 +148,12 @@ public class FlatMenuUI
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
try {
return renderer.applyStyleProperty( key, value );
@@ -178,9 +174,7 @@ public class FlatMenuUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, menuItem, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatMenuItemUI.getStyleableInfos( renderer );

View File

@@ -277,9 +277,7 @@ public class FlatNativeWindowBorder
}
}
/**
* @since 1.1.1
*/
/** @since 1.1.1 */
public static void setNativeProvider( Provider provider ) {
if( nativeProvider != null )
throw new IllegalStateException();

View File

@@ -162,9 +162,7 @@ public class FlatPasswordFieldUI
}
}
/**
* @since 2
*/
/** @since 2 */
@Override
protected Object applyStyleProperty( String key, Object value ) {
if( key.equals( "capsLockIconColor" ) && capsLockIcon instanceof FlatCapsLockIcon ) {
@@ -178,9 +176,7 @@ public class FlatPasswordFieldUI
return super.applyStyleProperty( key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = super.getStyleableInfos( c );
@@ -225,9 +221,7 @@ public class FlatPasswordFieldUI
+ (isCapsLockVisible() ? capsLockIcon.getIconWidth() + UIScale.scale( iconTextGap ) : 0);
}
/**
* @since 1.4
*/
/** @since 1.4 */
protected boolean isCapsLockVisible() {
if( !showCapsLock )
return false;

View File

@@ -47,9 +47,7 @@ public class FlatPopupMenuBorder
UIManager.getColor( "PopupMenu.borderColor" ) );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Object applyStyleProperty( String key, Object value ) {
Object oldValue;
@@ -60,9 +58,7 @@ public class FlatPopupMenuBorder
throw new UnknownStyleException( key );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos() {
Map<String, Class<?>> infos = new LinkedHashMap<>();

View File

@@ -44,9 +44,7 @@ public class FlatPopupMenuSeparatorUI
: new FlatPopupMenuSeparatorUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatPopupMenuSeparatorUI( boolean shared ) {
super( shared );
}

View File

@@ -80,25 +80,19 @@ public class FlatPopupMenuUI
propertyChangeListener = null;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, popupMenu, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, popupMenu.getBorder() );

View File

@@ -129,23 +129,17 @@ public class FlatProgressBarUI
propertyChangeListener = null;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, progressBar, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -101,16 +101,12 @@ public class FlatRadioButtonMenuItemUI
return FlatStylingSupport.createPropertyChangeListener( c, this::applyStyle, super.createPropertyChangeListener( c ) );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
try {
return renderer.applyStyleProperty( key, value );
@@ -131,9 +127,7 @@ public class FlatRadioButtonMenuItemUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, menuItem, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatMenuItemUI.getStyleableInfos( renderer );

View File

@@ -81,9 +81,7 @@ public class FlatRadioButtonUI
: new FlatRadioButtonUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatRadioButtonUI( boolean shared ) {
this.shared = shared;
}
@@ -132,9 +130,7 @@ public class FlatRadioButtonUI
return new FlatRadioButtonListener( b );
}
/**
* @since 2
*/
/** @since 2 */
protected void propertyChange( AbstractButton b, PropertyChangeEvent e ) {
switch( e.getPropertyName() ) {
case FlatClientProperties.STYLE:
@@ -151,17 +147,13 @@ public class FlatRadioButtonUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( AbstractButton b, Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style,
(key, value) -> applyStyleProperty( b, key, value ) );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( AbstractButton b, String key, Object value ) {
// style icon
if( key.startsWith( "icon." ) ) {
@@ -180,9 +172,7 @@ public class FlatRadioButtonUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, b, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );
@@ -281,9 +271,7 @@ public class FlatRadioButtonUI
//---- class FlatRadioButtonListener --------------------------------------
/**
* @since 2
*/
/** @since 2 */
protected class FlatRadioButtonListener
extends BasicButtonListener
{

View File

@@ -198,24 +198,18 @@ public class FlatRootPaneUI
}
}
/**
* @since 1.1.2
*/
/** @since 1.1.2 */
protected void installNativeWindowBorder() {
nativeWindowBorderData = FlatNativeWindowBorder.install( rootPane );
}
/**
* @since 1.1.2
*/
/** @since 1.1.2 */
protected void uninstallNativeWindowBorder() {
FlatNativeWindowBorder.uninstall( rootPane, nativeWindowBorderData );
nativeWindowBorderData = null;
}
/**
* @since 1.1.2
*/
/** @since 1.1.2 */
public static void updateNativeWindowBorder( JRootPane rootPane ) {
RootPaneUI rui = rootPane.getUI();
if( !(rui instanceof FlatRootPaneUI) )

View File

@@ -220,9 +220,7 @@ public class FlatScrollBarUI
};
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
@@ -232,9 +230,7 @@ public class FlatScrollBarUI
((FlatScrollBarButton)decrButton).updateStyle();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
Object oldValue;
switch( key ) {
@@ -249,9 +245,7 @@ public class FlatScrollBarUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, scrollbar, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = new LinkedHashMap<>();

View File

@@ -301,16 +301,12 @@ public class FlatScrollPaneUI
return handler;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( key.equals( "focusWidth" ) ) {
int focusWidth = (value instanceof Integer) ? (int) value : UIManager.getInt( "Component.focusWidth" );
@@ -322,9 +318,7 @@ public class FlatScrollPaneUI
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, scrollpane, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, scrollpane.getBorder() );
@@ -379,9 +373,7 @@ public class FlatScrollPaneUI
paint( g, c );
}
/**
* @since 1.3
*/
/** @since 1.3 */
public static boolean isPermanentFocusOwner( JScrollPane scrollPane ) {
JViewport viewport = scrollPane.getViewport();
Component view = (viewport != null) ? viewport.getView() : null;

View File

@@ -67,9 +67,7 @@ public class FlatSeparatorUI
: new FlatSeparatorUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatSeparatorUI( boolean shared ) {
this.shared = shared;
}
@@ -135,24 +133,18 @@ public class FlatSeparatorUI
s.repaint();
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( JSeparator s, Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style,
(key, value) -> applyStyleProperty( s, key, value ) );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( JSeparator s, String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, s, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -192,23 +192,17 @@ public class FlatSliderUI
super.createPropertyChangeListener( slider ) );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, slider, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -190,27 +190,21 @@ public class FlatSpinnerUI
return handler;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
updateEditorPadding();
updateArrowButtonsStyle();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, spinner, borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, spinner.getBorder() );
@@ -280,9 +274,7 @@ public class FlatSpinnerUI
: null;
}
/**
* @since 1.3
*/
/** @since 1.3 */
public static boolean isPermanentFocusOwner( JSpinner spinner ) {
if( FlatUIUtils.isPermanentFocusOwner( spinner ) )
return true;

View File

@@ -138,9 +138,7 @@ public class FlatSplitPaneUI
return new FlatSplitPaneDivider( this );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
@@ -148,9 +146,7 @@ public class FlatSplitPaneUI
((FlatSplitPaneDivider)divider).updateStyle();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
try {
if( divider instanceof FlatSplitPaneDivider )
@@ -161,9 +157,7 @@ public class FlatSplitPaneUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, splitPane, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -52,6 +52,8 @@ public class FlatStylingSupport
* Indicates that a field is intended to be used by FlatLaf styling support.
* <p>
* <strong>Do not rename fields annotated with this annotation.</strong>
*
* @since 2
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@@ -60,10 +62,12 @@ public class FlatStylingSupport
Class<?> type() default Void.class;
}
/** @since 2 */
public interface StyleableUI {
Map<String, Class<?>> getStyleableInfos( JComponent c );
}
/** @since 2 */
public interface StyleableBorder {
Object applyStyleProperty( String key, Object value );
Map<String, Class<?>> getStyleableInfos();

View File

@@ -572,9 +572,7 @@ public class FlatTabbedPaneUI
return new FlatScrollableTabButton( direction );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
@@ -585,9 +583,7 @@ public class FlatTabbedPaneUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
// close icon
if( key.startsWith( "close" ) ) {
@@ -629,9 +625,7 @@ public class FlatTabbedPaneUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, tabPane, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = new LinkedHashMap<>();

View File

@@ -141,16 +141,12 @@ public class FlatTableHeaderUI
propertyChangeListener = null;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( key.equals( "sortIconPosition" ) && value instanceof String )
value = parseSortIconPosition( (String) value );
@@ -158,9 +154,7 @@ public class FlatTableHeaderUI
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, header, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
@@ -345,9 +339,7 @@ public class FlatTableHeaderUI
//---- class FlatMouseInputHandler ----------------------------------------
/**
* @since 1.6
*/
/** @since 1.6 */
protected class FlatMouseInputHandler
extends MouseInputHandler
{

View File

@@ -235,9 +235,7 @@ public class FlatTableUI
};
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
Color oldSelectionBackground = selectionBackground;
Color oldSelectionForeground = selectionForeground;
@@ -265,16 +263,12 @@ public class FlatTableUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, table, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -146,9 +146,7 @@ public class FlatTextAreaUI
FlatEditorPaneUI.propertyChange( getComponent(), e, this::applyStyle );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
@@ -158,16 +156,12 @@ public class FlatTextAreaUI
updateBackground();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, getComponent(), key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -226,9 +226,7 @@ public class FlatTextFieldUI
}
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
@@ -238,18 +236,14 @@ public class FlatTextFieldUI
updateBackground();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
if( borderShared == null )
borderShared = new AtomicBoolean( true );
return FlatStylingSupport.applyToAnnotatedObjectOrBorder( this, key, value, getComponent(), borderShared );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this, getComponent().getBorder() );
@@ -557,16 +551,12 @@ debug*/
return getComponent().getComponentOrientation().isLeftToRight();
}
/**
* @since 1.4
*/
/** @since 1.4 */
protected Insets getPadding() {
return scale( clientProperty( getComponent(), TEXT_FIELD_PADDING, null, Insets.class ) );
}
/**
* @since 1.4
*/
/** @since 1.4 */
protected void scrollCaretToVisible() {
Caret caret = getComponent().getCaret();
if( caret instanceof FlatCaret )

View File

@@ -154,9 +154,7 @@ public class FlatTextPaneUI
FlatEditorPaneUI.propertyChange( getComponent(), e, this::applyStyle );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldDisabledBackground = disabledBackground;
oldInactiveBackground = inactiveBackground;
@@ -166,16 +164,12 @@ public class FlatTextPaneUI
updateBackground();
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, getComponent(), key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -871,9 +871,7 @@ debug*/
//---- class FlatTitleLabelUI ---------------------------------------------
/**
* @since 1.1
*/
/** @since 1.1 */
protected class FlatTitleLabelUI
extends FlatLabelUI
{

View File

@@ -31,9 +31,7 @@ public class FlatTitlePaneIcon
{
private final List<Image> images;
/**
* @since 1.2
*/
/** @since 1.2 */
public FlatTitlePaneIcon( List<Image> images, Dimension size ) {
super( null, size.width, size.height );
this.images = images;

View File

@@ -146,9 +146,7 @@ public class FlatToggleButtonUI
}
}
/**
* @since 2
*/
/** @since 2 */
@Override
protected Object applyStyleProperty( AbstractButton b, String key, Object value ) {
if( key.startsWith( "help." ) )
@@ -157,9 +155,7 @@ public class FlatToggleButtonUI
return super.applyStyleProperty( b, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
Map<String, Class<?>> infos = super.getStyleableInfos( c );

View File

@@ -65,9 +65,7 @@ public class FlatToolBarSeparatorUI
: new FlatToolBarSeparatorUI( false );
}
/**
* @since 2
*/
/** @since 2 */
protected FlatToolBarSeparatorUI( boolean shared ) {
this.shared = shared;
}
@@ -131,23 +129,17 @@ public class FlatToolBarSeparatorUI
s.repaint();
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObject( this, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -136,9 +136,7 @@ public class FlatToolBarUI
return FlatStylingSupport.createPropertyChangeListener( toolBar, this::applyStyle, super.createPropertyListener() );
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
boolean oldFocusableButtons = focusableButtons;
@@ -148,24 +146,18 @@ public class FlatToolBarUI
setButtonsFocusable( focusableButtons );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, toolBar, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );
}
/**
* @since 1.4
*/
/** @since 1.4 */
protected void setButtonsFocusable( boolean focusable ) {
for( Component c : toolBar.getComponents() ) {
if( c instanceof AbstractButton )

View File

@@ -309,23 +309,17 @@ public class FlatTreeUI
return bounds;
}
/**
* @since 2
*/
/** @since 2 */
protected void applyStyle( Object style ) {
oldStyleValues = FlatStylingSupport.parseAndApply( oldStyleValues, style, this::applyStyleProperty );
}
/**
* @since 2
*/
/** @since 2 */
protected Object applyStyleProperty( String key, Object value ) {
return FlatStylingSupport.applyToAnnotatedObjectOrComponent( this, tree, key, value );
}
/**
* @since 2
*/
/** @since 2 */
@Override
public Map<String, Class<?>> getStyleableInfos( JComponent c ) {
return FlatStylingSupport.getAnnotatedStyleableInfos( this );

View File

@@ -130,9 +130,7 @@ public class FlatUIUtils
return (color != null) ? color : UIManager.getColor( defaultKey );
}
/**
* @since 1.1
*/
/** @since 1.1 */
public static boolean getUIBoolean( String key, boolean defaultValue ) {
Object value = UIManager.get( key );
return (value instanceof Boolean) ? (Boolean) value : defaultValue;
@@ -148,9 +146,7 @@ public class FlatUIUtils
return (value instanceof Number) ? ((Number)value).floatValue() : defaultValue;
}
/**
* @since 1.1.2
*/
/** @since 1.1.2 */
public static boolean getBoolean( JComponent c, String systemPropertyKey,
String clientPropertyKey, String uiKey, boolean defaultValue )
{