Skip to content

Commit

Permalink
fixed typos and grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCharly committed Jan 11, 2024
1 parent 6fdc56f commit cf3fa17
Show file tree
Hide file tree
Showing 49 changed files with 90 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# test against
# - Java 8 (minimum requirement)
# - Java LTS versions (11, 17, ...)
# - lastest Java version(s)
# - latest Java version(s)
java:
- 8
- 11 # LTS
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ build script:
artifactId: flatlaf
version: (see button below)

Otherwise download `flatlaf-<version>.jar` here:
Otherwise, download `flatlaf-<version>.jar` here:

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf/badge.svg?style=flat-square&color=007ec6)](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf)

Expand Down Expand Up @@ -141,7 +141,6 @@ details and downloads.
Buzz
----

- [What others say about FlatLaf on Twitter](https://twitter.com/search?f=live&q=flatlaf)
- [FlatLaf 3.1 (and 3.0) announcement on Reddit](https://www.reddit.com/r/java/comments/12xgrsu/flatlaf_31_and_30_swing_look_and_feel/)
- [FlatLaf 1.0 announcement on Reddit](https://www.reddit.com/r/java/comments/lsbcwe/flatlaf_10_swing_look_and_feel/)
- [FlatLaf announcement on Reddit](https://www.reddit.com/r/java/comments/dl0hu3/flatlaf_flat_look_and_feel/)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/ReorderJarEntries.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void reorderJarEntries( File jarFile )
// 1st pass: copy .properties files
copyFiles( zipOutStream, jarFile, name -> name.endsWith( ".properties" ) );

// 2st pass: copy other files
// 2nd pass: copy other files
copyFiles( zipOutStream, jarFile, name -> !name.endsWith( ".properties" ) );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface FlatClientProperties
//---- JButton ------------------------------------------------------------

/**
* Specifies type of a button.
* Specifies type of button.
* <p>
* <strong>Components</strong> {@link javax.swing.JButton} and {@link javax.swing.JToggleButton}<br>
* <strong>Value type</strong> {@link java.lang.String}<br>
Expand Down Expand Up @@ -421,10 +421,10 @@ public interface FlatClientProperties
String TITLE_BAR_SHOW_TITLE = "JRootPane.titleBarShowTitle";

/**
* Specifies whether the "iconfify" button should be shown in the window title bar
* Specifies whether the "iconify" button should be shown in the window title bar
* (requires enabled window decorations). Default is {@code true}.
* <p>
* Setting this shows/hides the "iconfify" button
* Setting this shows/hides the "iconify" button
* for the {@code JFrame} that contains the root pane.
* <p>
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
Expand Down Expand Up @@ -506,7 +506,7 @@ public interface FlatClientProperties
* On macOS, Java supports this out of the box.
* <p>
* Note that this client property must be set before the window becomes displayable.
* Otherwise an {@link IllegalComponentStateException} is thrown.
* Otherwise, an {@link IllegalComponentStateException} is thrown.
* <p>
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
* <strong>Value type</strong> {@link java.lang.String}<br>
Expand Down Expand Up @@ -952,7 +952,7 @@ public interface FlatClientProperties
String TABBED_PANE_TAB_ICON_PLACEMENT = "JTabbedPane.tabIconPlacement";

/**
* Specifies the rotation of the tabs (title, icon, etc).
* Specifies the rotation of the tabs (title, icon, etc.).
* <p>
* <strong>Component</strong> {@link javax.swing.JTabbedPane}<br>
* <strong>Value type</strong> {@link java.lang.Integer} or {@link java.lang.String}<br>
Expand Down Expand Up @@ -980,7 +980,7 @@ public interface FlatClientProperties
* Tabs are rotated depending on tab placement.
* <p>
* For top and bottom tab placement, the tabs are not rotated.<br>
* For left tab placement, the tabs are rotated counter clockwise.<br>
* For left tab placement, the tabs are rotated counter-clockwise.<br>
* For right tab placement, the tabs are rotated clockwise.
*
* @see #TABBED_PANE_TAB_ROTATION
Expand All @@ -989,7 +989,7 @@ public interface FlatClientProperties
String TABBED_PANE_TAB_ROTATION_AUTO = "auto";

/**
* Tabs are rotated counter clockwise.
* Tabs are rotated counter-clockwise.
*
* @see #TABBED_PANE_TAB_ROTATION
* @since 3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static void initBasicInputMaps( UIDefaults defaults ) {
);
}

// join ltr and rtl bindings to fix up/down/etc keys in right-to-left component orientation
// join ltr and rtl bindings to fix up/down/etc. keys in right-to-left component orientation
Object[] bindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings" );
Object[] rtlBindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings.RightToLeft" );
if( bindings != null && rtlBindings != null ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public interface FlatSystemProperties
* in system properties {@code sun.boot.library.path} and {@code java.library.path}.
* (supported since FlatLaf 2.6)
* <p>
* If the native library can not loaded from the given path (or via {@link System#loadLibrary(String)}),
* If the native library can not be loaded from the given path (or via {@link System#loadLibrary(String)}),
* then the embedded native library is extracted to the temporary directory and loaded from there.
*
* @since 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private static String mapFcName( String name ) {
* 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.
* (System Settings > Fonts > Force Font DPI). An application restart is necessary.
* This is the same behavior as in native KDE applications.
*
* The "display scale factor" (kdeglobals: [KScreen] > ScaleFactor) is not used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void menuSelectionChanged() {
targetTopY = popupLocation.y;
targetBottomY = popupLocation.y + popupSize.height;

// install own event queue to supress mouse events when mouse is moved within safe triangle
// install own event queue to suppress mouse events when mouse is moved within safe triangle
if( subMenuEventQueue == null )
subMenuEventQueue = new SubMenuEventQueue();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected void paintIcon( Component c, Graphics2D g ) {
closeSize.width, closeSize.height, closeArc, closeArc );
}

// set cross color
// set color of cross
Color fg = FlatButtonUI.buttonStateColor( c, closeForeground, null, null, closeHoverForeground, closePressedForeground );
g.setColor( FlatUIUtils.deriveColor( fg, c.getForeground() ) );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ protected void paintIcon( Component c, Graphics2D g ) {
double arc = 1.5;
double arc2 = 0.5;
path = FlatUIUtils.createPath( false,
// bottom-left of opend part
// bottom-left of opened part
2,13.5,
// top-left of opend part
// top-left of opened part
FlatUIUtils.ROUNDED, 4.5,7.5, arc,
// top-right of opend part
// top-right of opened part
FlatUIUtils.ROUNDED, 15.5,7.5, arc2,

// bottom-right
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected void paintIcon( Component c, Graphics2D g ) {
protected void paintBackground( Component c, Graphics2D g ) {
Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground );
if( background != null ) {
// disable antialiasing for background rectangle painting to avoid blury edges when scaled (e.g. at 125% or 175%)
// disable antialiasing for background rectangle painting to avoid blurry edges when scaled (e.g. at 125% or 175%)
Object oldHint = g.getRenderingHint( RenderingHints.KEY_ANTIALIASING );
g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ protected Rectangle computePopupBounds( int px, int py, int pw, int ph ) {
protected void configurePopup() {
super.configurePopup();

// make opaque to avoid that background shines thru border (e.g. at 150% scaling)
// make opaque to avoid that background shines through border (e.g. at 150% scaling)
setOpaque( true );

// set popup border
Expand All @@ -944,7 +944,7 @@ void updateStyle() {
if( popupBackground != null )
list.setBackground( popupBackground );

// set popup background because it may shine thru when scaled (e.g. at 150%)
// set popup background because it may shine through when scaled (e.g. at 150%)
// use non-UIResource to avoid that it is overwritten when making
// popup visible (see JPopupMenu.setInvoker()) in theme editor preview
setBackground( FlatUIUtils.nonUIResource( list.getBackground() ) );
Expand Down Expand Up @@ -1090,7 +1090,7 @@ private static class CellPaddingBorder
}

// using synchronized to avoid problems with code that modifies combo box
// (model, selection, etc) not on AWT thread (which should be not done)
// (model, selection, etc.) not on AWT thread (which should be not done)
synchronized void install( Component c, int focusWidth ) {
if( !(c instanceof JComponent) )
return;
Expand Down Expand Up @@ -1242,7 +1242,7 @@ public void actionPerformed( ActionEvent e ) {
* Key selection manager that delegates to the default manager.
* Shows the popup if Space key is pressed and "typed characters" buffer is empty.
* If items contain spaces (e.g. "a b") it is still possible to select them
* by pressing keys a, Space and b.
* by pressing keys 'a', 'Space' and 'b'.
*/
private class FlatKeySelectionManager
implements JComboBox.KeySelectionManager, UIResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protected void paintCellSelection( Graphics g, int row, int x, int y, int width,
int leftIndex = locationToIndex( list, new Point( r.x - 1, r.y ) );
int rightIndex = locationToIndex( list, new Point( r.x + r.width, r.y ) );

// special handling for the case that last column contains less cells than the other columns
// special handling for the case that last column contains fewer cells than the other columns
boolean ltr = list.getComponentOrientation().isLeftToRight();
if( !ltr && leftIndex >= 0 && leftIndex != row && leftIndex == locationToIndex( list, new Point( r.x - 1, r.y - 1 ) ) )
leftIndex = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ else if( SystemInfo.isX86_64 )
//
// To avoid this, flatlaf.dll is not linked to jawt.dll,
// which avoids loading jawt.dll when flatlaf.dll is loaded.
// Instead flatlaf.dll dynamically loads jawt.dll when first used,
// Instead, flatlaf.dll dynamically loads jawt.dll when first used,
// which is guaranteed after AWT initialization.

} else if( SystemInfo.isMacOS_10_14_Mojave_orLater && (SystemInfo.isAARCH64 || SystemInfo.isX86_64) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public Dimension getPreferredSize( JComponent c ) {

@Override
public void paint( Graphics g, JComponent c ) {
// fill background even if not opaque if
// fill background even if not opaque and if:
// - contentAreaFilled is true and
// - if background color is different to default background color
// (this paints selection if using the component as cell renderer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ protected PropertyChangeListener createPropertyChangeListener() {
// because scroll bars do not receive mouse exited event.
// The scroll pane, including its scroll bars, is not part
// of the component hierarchy and does not receive mouse events
// directly. Instead LWComponentPeer receives mouse events
// directly. Instead, LWComponentPeer receives mouse events
// and delegates them to peers, but entered/exited events
// are sent only for the whole scroll pane.
// Exited event is only sent when mouse leaves scroll pane.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ protected void installHiddenTabsNavigation() {

// At this point, BasicTabbedPaneUI already has installed
// TabbedPaneScrollLayout (in super.createLayoutManager()) and
// ScrollableTabSupport, ScrollableTabViewport, ScrollableTabPanel, etc
// ScrollableTabSupport, ScrollableTabViewport, ScrollableTabPanel, etc.
// (in super.installComponents()).

// install own layout manager that delegates to original layout manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected void installDefaults() {
else
table.addPropertyChangeListener( new FlatTablePropertyWatcher() );

// installl boolean renderer
// install boolean renderer
oldBooleanRenderer = table.getDefaultRenderer( Boolean.class );
if( oldBooleanRenderer instanceof UIResource )
table.setDefaultRenderer( Boolean.class, new FlatBooleanRenderer() );
Expand Down Expand Up @@ -222,11 +222,11 @@ protected void uninstallDefaults() {
if( watcher != null )
watcher.enabled = true;

// uninstalll boolean renderer
// uninstall boolean renderer
if( table.getDefaultRenderer( Boolean.class ) instanceof FlatBooleanRenderer ) {
if( oldBooleanRenderer instanceof Component ) {
// because the old renderer component was not attached to any component hierearchy,
// its UI was not yet updated and it is necessary to do it here
// because the old renderer component was not attached to any component hierarchy,
// its UI was not yet updated, and it is necessary to do it here
SwingUtilities.updateComponentTreeUI( (Component) oldBooleanRenderer );
}
table.setDefaultRenderer( Boolean.class, oldBooleanRenderer );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ public void windowStateChanged( WindowEvent e ) {
public void mouseClicked( MouseEvent e ) {
// on Linux, when using native library, the mouse clicked event
// is usually not sent and maximize/restore is done in mouse pressed event
// this check is here for the case that a mouse clicked event comes thru for some reason
// this check is here for the case that a mouse clicked event comes through for some reason
if( linuxNativeMove && SystemInfo.isLinux && FlatNativeLinuxLibrary.isWMUtilsSupported( window ) ) {
// see comment in mousePressed()
if( lastSingleClickWhen != 0 && (e.getWhen() - lastSingleClickWhen) <= getMultiClickInterval() ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public static void paintOutline( Graphics2D g, float x, float y, float w, float
}

/**
* Creates a (rounded) rectangle used to paint components (border, background, etc).
* Creates a (rounded) rectangle used to paint components (border, background, etc.).
* The given arc diameter is limited to min(width,height).
*/
public static Shape createComponentRectangle( float x, float y, float w, float h, float arc ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void registerFontFamilyLoader( String family, Runnable loader ) {

/**
* Loads a font family previously registered via {@link #registerFontFamilyLoader(String, Runnable)}.
* If the family is already loaded or no londer is registered for that family, nothing happens.
* If the family is already loaded or no loader is registered for that family, nothing happens.
*/
public static void loadFontFamily( String family ) {
if( !hasLoaders() )
Expand Down Expand Up @@ -109,7 +109,7 @@ public static boolean installFont( URL url ) {
}

/**
* Returns all font familiy names available in the graphics environment.
* Returns all font family names available in the graphics environment.
* This invokes {@link GraphicsEnvironment#getAvailableFontFamilyNames()} and
* appends families registered for lazy loading via {@link #registerFontFamilyLoader(String, Runnable)}
* to the result.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public static float computeFontScaleFactor( Font font ) {
if( SystemInfo.isWindows ) {
// Special handling for Windows to be compatible with OS scaling,
// which distinguish between "screen scaling" and "text scaling".
// - Windows "screen scaling" scales everything (text, icon, gaps, etc)
// - Windows "screen scaling" scales everything (text, icon, gaps, etc.)
// and may have different scaling factors for each screen.
// - Windows "text scaling" increases only the font size, but on all screens.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void addDefaultTabsNoContent( JTabbedPane tabbedPane, int count ) {
private void closeButtonStyleChanged() {
// WARNING:
// Do not use this trick to style individual tabbed panes in own code.
// Instead use one styling for all tabbed panes in your application.
// Instead, use one styling for all tabbed panes in your application.
if( circleCloseButton.isSelected() ) {
UIManager.put( "TabbedPane.closeArc", 999 );
UIManager.put( "TabbedPane.closeCrossFilledSize", 5.5f );
Expand Down
2 changes: 1 addition & 1 deletion flatlaf-extras/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build script:
artifactId: flatlaf-extras
version: (see button below)

Otherwise download `flatlaf-extras-<version>.jar` here:
Otherwise, download `flatlaf-extras-<version>.jar` here:

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-extras/badge.svg?style=flat-square&color=007ec6)](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-extras)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public void removeNotify() {
}

/**
* Starts an animation that shows the snapshot (created by {@link #showSnapshot()}
* with an decreasing alpha. At the end, the snapshot is removed and the new UI is shown.
* Starts an animation that shows the snapshot (created by {@link #showSnapshot()})
* with a decreasing alpha. At the end, the snapshot is removed and the new UI is shown.
* Invoke after updating UI.
*/
public static void hideSnapshotWithAnimation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static void setHandler( String setHandlerMethodName, String handlerClass
(proxy, method, args) -> {
// Use invokeLater to release the listener firing for the case
// that the action listener shows a modal dialog.
// This (hopefully) prevents application hunging.
// This (hopefully) prevents application hanging.
EventQueue.invokeLater( () -> {
handler.run();
} );
Expand Down
Loading

0 comments on commit cf3fa17

Please sign in to comment.