diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java index 1737d8e3..ac73cff9 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatDefaultsAddon.java @@ -26,7 +26,7 @@ import javax.swing.UIDefaults; * Allows loading of additional .properties files from addon JARs. * {@link java.util.ServiceLoader} is used to load extensions of this class from addon JARs. *

- * If you extend this class in a addon JAR, you also have to add a text file named + * If you extend this class in an addon JAR, you also have to add a text file named * {@code META-INF/services/com.formdev.flatlaf.FlatDefaultsAddon} * to the addon JAR. The file must contain a single line with the class name. *

@@ -61,7 +61,7 @@ public abstract class FlatDefaultsAddon /** * Returns the priority used to sort addon loading. - * The order is only important if you want overwrite UI defaults of other addons. + * The order is only important if you want to overwrite UI defaults of other addons. * Lower numbers mean higher priority. * Returns 10000 by default. */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIconColors.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIconColors.java index 5cda400c..80089f19 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIconColors.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatIconColors.java @@ -19,7 +19,7 @@ package com.formdev.flatlaf; /** * Default color palette for action icons and object icons. *

- * The idea is to use only this well defined set of colors in SVG icons and + * The idea is to use only this well-defined set of colors in SVG icons, and * then they are replaced at runtime to dark variants or to other theme colors. * Then a single SVG icon (light variant) can be used for dark themes too. * IntelliJ Platform uses this mechanism to allow themes to change IntelliJ Platform icons. @@ -35,7 +35,7 @@ package com.formdev.flatlaf; *

* You may use these colors also in your application (outside of SVG icons), but do * not use the RGB values defined in this enum.
- * Instead use {@code UIManager.getColor( FlatIconColors.ACTIONS_GREY.key )}. + * Instead, use {@code UIManager.getColor( FlatIconColors.ACTIONS_GREY.key )}. * * @author Karl Tauber */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java index ba6ba298..29297e51 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatInputMaps.java @@ -596,7 +596,7 @@ class FlatInputMaps //---- class LazyInputMapEx ----------------------------------------------- /** - * Lazily creates a input map. + * Lazily creates an input map. * Similar to {@link UIDefaults.LazyInputMap}, but can use multiple bindings arrays. */ private static class LazyInputMapEx diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java index 4c92ac36..3570322e 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatLaf.java @@ -177,7 +177,7 @@ public abstract class FlatLaf * and JBR supports custom window decorations * * - * In this cases, custom decorations are enabled by the root pane. + * In these cases, custom decorations are enabled by the root pane. * Usage of {@link JFrame#setDefaultLookAndFeelDecorated(boolean)} or * {@link JDialog#setDefaultLookAndFeelDecorated(boolean)} is not necessary. */ @@ -760,7 +760,7 @@ public abstract class FlatLaf * Invoke this method before setting the look and feel. *

* If using Java modules, the package must be opened in {@code module-info.java}. - * Otherwise use {@link #registerCustomDefaultsSource(URL)}. + * Otherwise, use {@link #registerCustomDefaultsSource(URL)}. * * @param packageName a package name (e.g. "com.myapp.resources") */ @@ -862,7 +862,7 @@ public abstract class FlatLaf * E.g. using {@link UIManager#setLookAndFeel(LookAndFeel)} or {@link #setup(LookAndFeel)}. *

* The global extra defaults are useful for smaller additional defaults that may change. - * E.g. accent color. Otherwise FlatLaf properties files should be used. + * E.g. accent color. Otherwise, FlatLaf properties files should be used. * See {@link #registerCustomDefaultsSource(String)}. *

* The keys and values are strings in same format as in FlatLaf properties files. @@ -894,7 +894,7 @@ public abstract class FlatLaf * E.g. using {@link UIManager#setLookAndFeel(LookAndFeel)} or {@link #setup(LookAndFeel)}. *

* The extra defaults are useful for smaller additional defaults that may change. - * E.g. accent color. Otherwise FlatLaf properties files should be used. + * E.g. accent color. Otherwise, FlatLaf properties files should be used. * See {@link #registerCustomDefaultsSource(String)}. *

* The keys and values are strings in same format as in FlatLaf properties files. @@ -951,7 +951,7 @@ public abstract class FlatLaf // re-set current LaF UIManager.setLookAndFeel( lookAndFeel ); - // must fire property change events ourself because old and new LaF are the same + // must fire property change events ourselves because old and new LaF are the same PropertyChangeEvent e = new PropertyChangeEvent( UIManager.class, "lookAndFeel", lookAndFeel, lookAndFeel ); for( PropertyChangeListener l : UIManager.getPropertyChangeListeners() ) l.propertyChange( e ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java index 510ff75d..024a3688 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java @@ -34,7 +34,7 @@ public interface FlatSystemProperties * To replace the Java 9+ system scale factor, use system property "sun.java2d.uiScale", * which has the same syntax as this one. *

- * Since FlatLaf 1.1.2: Scale factors less then 100% are allowed. + * Since FlatLaf 1.1.2: Scale factors less than 100% are allowed. *

* Allowed Values e.g. {@code 1.5}, {@code 1.5x}, {@code 150%} or {@code 144dpi} (96dpi is 100%)
*/ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java index 277831b3..0d0491ae 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -175,7 +175,7 @@ public class IntelliJTheme defaults.put( "Button.hoverBorderColor", defaults.get( "Button.focusedBorderColor" ) ); defaults.put( "HelpButton.hoverBorderColor", defaults.get( "Button.focusedBorderColor" ) ); - // IDEA uses a SVG icon for the help button, but paints the background with Button.startBackground and Button.endBackground + // IDEA uses an SVG icon for the help button, but paints the background with Button.startBackground and Button.endBackground Object helpButtonBackground = defaults.get( "Button.startBackground" ); Object helpButtonBorderColor = defaults.get( "Button.startBorderColor" ); if( helpButtonBackground == null ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java index 837f5052..66a39200 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/LinuxFontPolicy.java @@ -197,7 +197,7 @@ class LinuxFontPolicy } /** - * Gets the default font for KDE for KDE configuration files. + * Gets the default font for KDE from KDE configuration files. * * The Swing fonts are not updated when the user changes system font size * (System Settings > Fonts > Force Font DPI). A application restart is necessary. diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java index 8c12896a..b27d0b5f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/UIDefaultsLoader.java @@ -792,7 +792,7 @@ class UIDefaultsLoader * Syntax: if(condition,trueValue,falseValue) *

* This "if" function is only used if the "if" is passed as parameter to another - * color function. Otherwise the general "if" function is used. + * color function. Otherwise, the general "if" function is used. */ private static Object parseColorIf( String value, List params, Function resolver, boolean reportError ) { if( params.size() != 3 ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java index 4d80f49b..c4757ecf 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAnimatedIcon.java @@ -23,13 +23,13 @@ import java.awt.Graphics2D; import com.formdev.flatlaf.util.AnimatedIcon; /** - * Base class for animated icons that scales width and height, creates and initializes + * Base class for animated icons that scale width and height, creates and initializes * a scaled graphics context for icon painting. *

* Subclasses do not need to scale icon painting. *

* This class does not store any state information (needed for animation) in its instance. - * Instead a client property is set on the painted component. + * Instead, a client property is set on the painted component. * This makes it possible to use a share icon instance for multiple components. * * @author Karl Tauber diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAscendingSortIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAscendingSortIcon.java index 8456dc0c..4e96348d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAscendingSortIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAscendingSortIcon.java @@ -51,7 +51,7 @@ public class FlatAscendingSortIcon boolean chevron = this.chevron; Color sortIconColor = this.sortIconColor; - // Because this icons are always shared for all table headers, + // Because this icon is always shared for all table headers, // get icon specific style from FlatTableHeaderUI. JTableHeader tableHeader = (JTableHeader) SwingUtilities.getAncestorOfClass( JTableHeader.class, c ); if( tableHeader != null ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatTreeCollapsedIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatTreeCollapsedIcon.java index d245f79c..9d76c9c4 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatTreeCollapsedIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatTreeCollapsedIcon.java @@ -76,7 +76,7 @@ public class FlatTreeCollapsedIcon } /** - * Because this icons are always shared for all trees, + * Because this icon is always shared for all trees, * get icon specific style from FlatTreeUI. */ static T getStyleFromTreeUI( Component c, Function f ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/resources/EmptyPackage.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/resources/EmptyPackage.java index 6b1610ca..32c214c2 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/resources/EmptyPackage.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/resources/EmptyPackage.java @@ -18,8 +18,8 @@ package com.formdev.flatlaf.resources; /** * The only purpose of this file is to add a .class file to this package to make it non-empty. - * Otherwise the compiler outputs a warning because this package is opend in module-info.java. - * Also when using --patch-module (e.g. from an IDE), an error would occur for empty packages. + * Otherwise, the compiler outputs a warning because this package is opened in module-info.java. + * Also, when using --patch-module (e.g. from an IDE), an error would occur for empty packages. * * @author Karl Tauber */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java index 19be5a93..d312e210 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonBorder.java @@ -159,7 +159,7 @@ public class FlatButtonBorder public Insets getBorderInsets( Component c, Insets insets ) { if( FlatButtonUI.isToolBarButton( c ) ) { // In toolbars, use button margin only if explicitly set. - // Otherwise use toolbar margin specified in UI defaults. + // Otherwise, use toolbar margin specified in UI defaults. Insets margin = (c instanceof AbstractButton) ? ((AbstractButton)c).getMargin() : null; diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java index 1f970a7c..f9ad1ec5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java @@ -343,7 +343,7 @@ public class FlatButtonUI /** * Returns true if the button has an icon but no text, - * or it it does not have an icon and the text is either "..." or one character. + * or it does not have an icon and the text is either "..." or one character. */ static boolean isIconOnlyOrSingleCharacterButton( Component c ) { if( !(c instanceof JButton) && !(c instanceof JToggleButton) ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatCaret.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatCaret.java index cd957bb8..b2ffa2cd 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatCaret.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatCaret.java @@ -96,7 +96,7 @@ public class FlatCaret // if text component is focused, then caret and selection are visible, // but when switching theme, the component does not yet have - // an highlighter and the selection is not painted + // a highlighter and the selection is not painted // --> make selection temporary invisible later, then the caret // adds selection highlights to the text component highlighter if( isSelectionVisible() ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListCellBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListCellBorder.java index 2eed2653..c8a01a02 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListCellBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListCellBorder.java @@ -72,7 +72,7 @@ public class FlatListCellBorder } /** - * Because this borders are always shared for all lists, + * Because this border is always shared for all lists, * get border specific style from FlatListUI. */ static T getStyleFromListUI( Component c, Function f ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListUI.java index 3d347f9e..638e8cce 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListUI.java @@ -212,7 +212,7 @@ public class FlatListUI /** * Toggle selection colors from focused to inactive and vice versa. * - * This is not a optimal solution but much easier than rewriting the whole paint methods. + * This is not an optimal solution but much easier than rewriting the whole paint methods. * * Using a LaF specific renderer was avoided because often a custom renderer is * already used in applications. Then either the inactive colors are not used, diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemBorder.java index 108371ec..e601da90 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatMenuItemBorder.java @@ -35,7 +35,7 @@ import javax.swing.plaf.MenuBarUI; public class FlatMenuItemBorder extends FlatMarginBorder { - // only used if parent menubar is not a instance of FlatMenuBarUI + // only used if parent menubar is not an instance of FlatMenuBarUI private final Insets menuBarItemMargins = UIManager.getInsets( "MenuBar.itemMargins" ); @Override diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java index 414134df..61ebb31c 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java @@ -143,7 +143,7 @@ public class FlatPopupFactory *

* On a dual screen setup, where screens use different scale factors, it may happen * that the window location changes when showing a heavy weight popup window. - * E.g. when opening an dialog on the secondary screen and making combobox popup visible. + * E.g. when opening a dialog on the secondary screen and making combobox popup visible. *

* This is a workaround for https://bugs.openjdk.java.net/browse/JDK-8224608 */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java index c02341e9..9bb4110d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java @@ -212,7 +212,7 @@ public class FlatRadioButtonUI if( focusWidth > 0 ) { // Increase preferred width and height if insets were explicitly reduced (e.g. with // an EmptyBorder) and icon has a focus width, which is not included in icon size. - // Otherwise the component may be too small and outer focus border may be cut off. + // Otherwise, the component may be too small and outer focus border may be cut off. Insets insets = c.getInsets( tempInsets ); size.width += Math.max( focusWidth - insets.left, 0 ) + Math.max( focusWidth - insets.right, 0 ); size.height += Math.max( focusWidth - insets.top, 0 ) + Math.max( focusWidth - insets.bottom, 0 ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java index 649da315..bd21adde 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRootPaneUI.java @@ -179,8 +179,8 @@ public class FlatRootPaneUI super.installListeners( root ); if( SystemInfo.isJava_9_orLater ) { - // On HiDPI screens, where scaling is used, there may be white lines at the - // bottom and at the right side of the window when it is initially shown. + // On HiDPI screens, where scaling is used, there may be white lines on the + // bottom and on the right side of the window when it is initially shown. // This is very disturbing in dark themes, but hard to notice in light themes. // Seems to be a rounding issue when Swing adds dirty region of window // using RepaintManager.nativeAddDirtyRegion(). diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java index d87f20ca..96f6b8b3 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSliderUI.java @@ -234,7 +234,7 @@ public class FlatSliderUI return -1; // use default font (instead of slider font) because the slider font size - // may be different to label font size, but we want align the track/thumb with labels + // may be different to label font size, but we want to align the track/thumb with labels Font font = UIManager.getFont( "defaultFont" ); if( font == null ) font = slider.getFont(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java index f943b33c..d8504ec6 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatSpinnerUI.java @@ -447,7 +447,7 @@ public class FlatSpinnerUI Insets padding = scale( FlatSpinnerUI.this.padding ); Dimension editorSize = (editor != null) ? editor.getPreferredSize() : new Dimension( 0, 0 ); - // the arrows width is the same as the inner height so that the arrows area is square + // the arrow buttons width is the same as the inner height so that the arrow buttons area is square int minimumWidth = FlatUIUtils.minimumWidth( spinner, FlatSpinnerUI.this.minimumWidth ); int innerHeight = editorSize.height + padding.top + padding.bottom; float focusWidth = FlatUIUtils.getBorderFocusWidth( spinner ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java index cbbbeec1..ebe39427 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java @@ -359,7 +359,7 @@ public class FlatStylingSupport * @param key the name of the field * @param value the new value * @return the old value of the field - * @throws UnknownStyleException if object does not have a annotated field with given name + * @throws UnknownStyleException if object does not have an annotated field with given name * @throws IllegalArgumentException if value type does not fit to expected type */ public static Object applyToAnnotatedObject( Object obj, String key, Object value ) @@ -517,7 +517,7 @@ public class FlatStylingSupport * @param key the name of the field * @param value the new value * @return the old value of the field - * @throws UnknownStyleException if object does not have a annotated field with given name + * @throws UnknownStyleException if object does not have an annotated field with given name * @throws IllegalArgumentException if value type does not fit to expected type */ public static Object applyToAnnotatedObjectOrComponent( Object obj, Object comp, String key, Object value ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java index 66931abf..defa687f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java @@ -1983,7 +1983,7 @@ public class FlatTabbedPaneUI } protected JMenuItem createTabMenuItem( int tabIndex ) { - // search for tab name in this places + // search for tab name in these places // 1. tab title // 2. text of label or text component in custom tab component (including children) // 3. accessible name of tab diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableCellBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableCellBorder.java index d5fd7b8e..254cd352 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableCellBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableCellBorder.java @@ -72,7 +72,7 @@ public class FlatTableCellBorder } /** - * Because this borders are always shared for all tables, + * Because this border is always shared for all tables, * get border specific style from FlatTableUI. */ static T getStyleFromTableUI( Component c, Function f ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java index aeac29cc..44269bd4 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java @@ -288,7 +288,7 @@ public class FlatTableUI /** * Toggle selection colors from focused to inactive and vice versa. * - * This is not a optimal solution but much easier than rewriting the whole paint methods. + * This is not an optimal solution but much easier than rewriting the whole paint methods. * * Using a LaF specific renderer was avoided because often a custom renderer is * already used in applications. Then either the inactive colors are not used, diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java index 7b75b43d..feba4915 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTextFieldUI.java @@ -369,7 +369,7 @@ public class FlatTextFieldUI if( !(oldBackground instanceof UIResource) ) return; - // do not update background if it currently has a unknown color (assigned from outside) + // do not update background if it currently has an unknown color (assigned from outside) if( oldBackground != background && oldBackground != disabledBackground && oldBackground != inactiveBackground && @@ -610,7 +610,7 @@ debug*/ * Returns the rectangle used to paint leading and trailing icons. * It invokes {@code super.getVisibleEditorRect()} and reduces left and/or * right margin if the text field has leading or trailing icons or components. - * Also the preferred widths of leading and trailing components are removed. + * Also, the preferred widths of leading and trailing components are removed. * * @since 2 */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java index 8082e3fc..ced4110d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java @@ -248,7 +248,7 @@ public class FlatTitlePane if( rootPane.getWindowDecorationStyle() == JRootPane.FRAME ) { // JRootPane.FRAME works only for frames (and not for dialogs) // but at this time the owner window type is unknown (not yet added) - // so we add the iconify/maximize/restore buttons and they are shown + // so we add the iconify/maximize/restore buttons, and they are shown // later in frameStateChanged(), which is invoked from addNotify() buttonPanel.add( iconifyButton ); @@ -420,7 +420,7 @@ public class FlatTitlePane } /** - * Returns whether this title pane currently has an visible and embedded menubar. + * Returns whether this title pane currently has a visible and embedded menubar. */ protected boolean hasVisibleEmbeddedMenuBar( JMenuBar menuBar ) { return menuBar != null && menuBar.isVisible() && isMenuBarEmbedded(); @@ -772,7 +772,7 @@ debug*/ if( horizontalGlue != null ) { // If menu bar is embedded and contains a horizontal glue component, // then split the hit test spot into two spots so that - // the glue component area can used to move the window. + // the glue component area can be used to move the window. Point glueLocation = SwingUtilities.convertPoint( horizontalGlue, 0, 0, window ); int x2 = glueLocation.x + horizontalGlue.getWidth(); @@ -911,7 +911,7 @@ debug*/ boolean center = hasEmbeddedMenuBar ? centerTitleIfMenuBarEmbedded : centerTitle; if( center ) { // If window is wide enough, center title within window bounds. - // Otherwise leave it centered within free space (label bounds). + // Otherwise, leave it centered within free space (label bounds). int centeredTextX = ((l.getParent().getWidth() - textWidth) / 2) - l.getX(); if( centeredTextX >= gap && centeredTextX + textWidth <= labelWidth - gap ) textX = centeredTextX; diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarUI.java index 1c21d14d..57f30740 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatToolBarUI.java @@ -282,7 +282,7 @@ public class FlatToolBarUI return comboBox.getUI().isFocusTraversable( comboBox ); } - // check whether component has a empty input map to skip components that + // check whether component has an empty input map to skip components that // are focusable, but do nothing when focused (e.g. JLabel) // see LayoutFocusTraversalPolicy.accept() if( c instanceof JComponent ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java index fda0c1c8..6daf5711 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java @@ -777,8 +777,8 @@ public class FlatUIUtils * {@link SwingConstants#WEST} or {@link SwingConstants#EAST}) * @param chevron {@code true} for chevron arrow, {@code false} for triangle arrow * @param arrowSize the width of the painted arrow (for vertical direction) (will be scaled) - * @param xOffset a offset added to the x coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled) - * @param yOffset a offset added to the y coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled) + * @param xOffset an offset added to the x coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled) + * @param yOffset an offset added to the y coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled) * * @since 1.1 */ @@ -828,7 +828,7 @@ debug*/ /** * Creates a chevron or triangle arrow shape for the given direction and size. *

- * The chevron shape is a open path that can be painted with {@link Graphics2D#draw(Shape)}. + * The chevron shape is an open path that can be painted with {@link Graphics2D#draw(Shape)}. * The triangle shape is a close path that can be painted with {@link Graphics2D#fill(Shape)}. * * @param direction the arrow direction ({@link SwingConstants#NORTH}, {@link SwingConstants#SOUTH} @@ -880,7 +880,7 @@ debug*/ } /** - * Creates a open or closed path for the given points. + * Creates an open or closed path for the given points. */ public static Path2D createPath( boolean close, double... points ) { Path2D path = new Path2D.Float(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java index 2f75804f..74786e87 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java @@ -155,7 +155,7 @@ class FlatWindowsNativeWindowBorder } /** - * Tell the window whether the application wants use custom decorations. + * Tell the window whether the application wants to use custom decorations. * If {@code true}, the Windows 10 title bar is hidden (including minimize, * maximize and close buttons), but not the resize borders (including drop shadow). */ diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java index da0b0a1a..7501172f 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/AnimatedIcon.java @@ -59,7 +59,7 @@ import com.formdev.flatlaf.util.Animator.Interpolator; * * * Animation works only if the component passed to {@link #paintIcon(Component, Graphics, int, int)} - * is a instance of {@link JComponent}. + * is an instance of {@link JComponent}. * A client property is set on the component to store the animation state. * * @author Karl Tauber diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/DerivedColor.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/DerivedColor.java index 73b55587..c7e1fdfa 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/DerivedColor.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/DerivedColor.java @@ -47,7 +47,7 @@ public class DerivedColor Color result = ColorFunctions.applyFunctions( baseColor, functions ); // if the result is equal to the default color, then the original base color - // was passed and we can cache this to avoid color calculations + // was passed, and we can cache this to avoid color calculations if( !hasBaseOfDefaultColor && result.getRGB() == this.getRGB() ) { hasBaseOfDefaultColor = true; baseOfDefaultColorRGB = baseColor.getRGB(); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HSLColor.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HSLColor.java index 4ba3ebed..7c925907 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HSLColor.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HSLColor.java @@ -76,7 +76,7 @@ public class HSLColor } /** - * Create a HSLColor object using an an array containing the + * Create a HSLColor object using an array containing the * individual HSL values and with a default alpha value of 1. * * @param hsl array containing HSL values @@ -87,7 +87,7 @@ public class HSLColor } /** - * Create a HSLColor object using an an array containing the + * Create a HSLColor object using an array containing the * individual HSL values. * * @param hsl array containing HSL values diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HiDPIUtils.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HiDPIUtils.java index 6a67af16..018bab96 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HiDPIUtils.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/HiDPIUtils.java @@ -114,7 +114,7 @@ public class HiDPIUtils * painted too far down on some operating systems. * The higher the system scale factor is, the more. *

- * This methods computes a correction value for the Y position. + * This method computes a correction value for the Y position. */ public static float computeTextYCorrection( Graphics2D g ) { if( !useTextYCorrection() || !SystemInfo.isWindows ) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/MultiResolutionImageSupport.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/MultiResolutionImageSupport.java index ace4a720..cd635dbe 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/MultiResolutionImageSupport.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/MultiResolutionImageSupport.java @@ -72,7 +72,7 @@ public class MultiResolutionImageSupport *

* The given dimensions array is only used for {@link #getResolutionVariants(Image)}. * The producer function may be invoked with any dimension (that is not contained in - * dimensions array) and is expected to produce a image for the passed in dimension. + * dimensions array) and is expected to produce an image for the passed in dimension. * * @param baseImageIndex index of the base image in the dimensions array * @param dimensions dimensions of resolution variants (sorted by size; smallest first) @@ -92,7 +92,7 @@ public class MultiResolutionImageSupport * for "disabled" state. * * @param image a multi-resolution image that is mapped using the given mapper function - * @param mapper mapper function that maps a single resolution variant to a new image (e.g. applying an filter) + * @param mapper mapper function that maps a single resolution variant to a new image (e.g. applying a filter) * @return a multi-resolution image on Java 9 or later; a mapped image on Java 8 */ public static Image map( Image image, Function mapper ) { @@ -104,7 +104,7 @@ public class MultiResolutionImageSupport *

* If the given image is a multi-resolution image then invokes * {@code java.awt.image.MultiResolutionImage.getResolutionVariant(destImageWidth, destImageHeight)}. - * Otherwise returns the given image. + * Otherwise, returns the given image. */ public static Image getResolutionVariant( Image image, int destImageWidth, int destImageHeight ) { return image; @@ -115,7 +115,7 @@ public class MultiResolutionImageSupport *

* If the given image is a multi-resolution image then invokes * {@code java.awt.image.MultiResolutionImage.getResolutionVariants()}. - * Otherwise returns a list containing only the given image. + * Otherwise, returns a list containing only the given image. */ public static List getResolutionVariants( Image image ) { return Collections.singletonList( image ); diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/NativeLibrary.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/NativeLibrary.java index a406a85b..dfa0f509 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/NativeLibrary.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/NativeLibrary.java @@ -195,7 +195,7 @@ public class NativeLibrary // for loaded native libraries, they will be deleted on next application startup. // The default temporary directory may contain hundreds or thousands of files. // To make searching for "marked for deletion" files as fast as possible, - // use a sub directory that contains only our temporary native libraries. + // use a subdirectory that contains only our temporary native libraries. tmpdir += "\\flatlaf.temp"; } diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java index c511b846..9706d018 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/UIScale.java @@ -103,7 +103,7 @@ public class UIScale // Java 9 and later supports per-monitor scaling jreHiDPI = true; } else if( SystemInfo.isJetBrainsJVM ) { - // IntelliJ IDEA ships its own JetBrains Java 8 JRE that may supports per-monitor scaling + // IntelliJ IDEA ships its own JetBrains Java 8 JRE that may support per-monitor scaling // see com.intellij.ui.JreHiDpiUtil.isJreHiDPIEnabled() try { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); @@ -411,7 +411,7 @@ public class UIScale * Scales the given dimension with the user scale factor. *

* If user scale factor is 1, then the given dimension is simply returned. - * Otherwise a new instance of {@link Dimension} or {@link DimensionUIResource} + * Otherwise, a new instance of {@link Dimension} or {@link DimensionUIResource} * is returned, depending on whether the passed dimension implements {@link UIResource}. */ public static Dimension scale( Dimension dimension ) { @@ -427,7 +427,7 @@ public class UIScale * Scales the given insets with the user scale factor. *

* If user scale factor is 1, then the given insets is simply returned. - * Otherwise a new instance of {@link Insets} or {@link InsetsUIResource} + * Otherwise, a new instance of {@link Insets} or {@link InsetsUIResource} * is returned, depending on whether the passed dimension implements {@link UIResource}. */ public static Insets scale( Insets insets ) { diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties index b2b669aa..07d6a181 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarculaLaf.properties @@ -24,7 +24,7 @@ # # NOTE: Avoid copying the whole content of this file to own properties files. # This will make upgrading to newer FlatLaf versions complex and error-prone. -# Instead copy and modify only those properties that you need to alter. +# Instead, copy and modify only those properties that you need to alter. # # Colors and style mostly based on Darcula theme from IntelliJ IDEA Community Edition, diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index f32253ea..5512f857 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -23,7 +23,7 @@ # # NOTE: Avoid copying the whole content of this file to own properties files. # This will make upgrading to newer FlatLaf versions complex and error-prone. -# Instead copy and modify only those properties that you need to alter. +# Instead, copy and modify only those properties that you need to alter. # # Colors and style mostly based on Darcula theme from IntelliJ IDEA Community Edition, diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties index d0c256be..5faff48b 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatIntelliJLaf.properties @@ -24,7 +24,7 @@ # # NOTE: Avoid copying the whole content of this file to own properties files. # This will make upgrading to newer FlatLaf versions complex and error-prone. -# Instead copy and modify only those properties that you need to alter. +# Instead, copy and modify only those properties that you need to alter. # # Colors and style mostly based on IntelliJ theme from IntelliJ IDEA Community Edition, diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index 94a29263..fe25729e 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -23,7 +23,7 @@ # # NOTE: Avoid copying the whole content of this file to own properties files. # This will make upgrading to newer FlatLaf versions complex and error-prone. -# Instead copy and modify only those properties that you need to alter. +# Instead, copy and modify only those properties that you need to alter. # #---- typography / fonts ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index e15b6fae..f1aeafb3 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -23,7 +23,7 @@ # # NOTE: Avoid copying the whole content of this file to own properties files. # This will make upgrading to newer FlatLaf versions complex and error-prone. -# Instead copy and modify only those properties that you need to alter. +# Instead, copy and modify only those properties that you need to alter. # # Colors and style mostly based on IntelliJ theme from IntelliJ IDEA Community Edition,