fixed typos and grammar

This commit is contained in:
Karl Tauber
2024-01-11 18:11:09 +01:00
parent 6fdc56f2d3
commit cf3fa17666
49 changed files with 90 additions and 91 deletions

View File

@@ -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)

View File

@@ -133,8 +133,8 @@ public class FlatAnimatedLafChange
}
/**
* 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() {

View File

@@ -119,7 +119,7 @@ public class FlatDesktop
(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();
} );

View File

@@ -87,7 +87,7 @@ public class FlatSVGIcon
* in the tag {@code <svg>} are used as icon size.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -106,7 +106,7 @@ public class FlatSVGIcon
* in the tag {@code <svg>} are used as icon size.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -124,7 +124,7 @@ public class FlatSVGIcon
* The icon is scaled if the given size is different to the size specified in the SVG file.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -144,7 +144,7 @@ public class FlatSVGIcon
* The icon is scaled if the given size is different to the size specified in the SVG file.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -166,7 +166,7 @@ public class FlatSVGIcon
* by the given scale factor.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -187,7 +187,7 @@ public class FlatSVGIcon
* by the given scale factor.
* <p>
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
* Otherwise use {@link #FlatSVGIcon(URL)}.
* Otherwise, use {@link #FlatSVGIcon(URL)}.
* <p>
* This is cheap operation because the icon is only loaded when used.
*
@@ -259,7 +259,7 @@ public class FlatSVGIcon
* <p>
* The input stream is loaded, parsed and closed immediately.
*
* @param in the input stream for reading a SVG resource
* @param in the input stream for reading an SVG resource
* @throws IOException if an I/O exception occurs
* @since 2
*/

View File

@@ -46,10 +46,10 @@ public class FlatSVGUtils
* then a single multi-resolution image is returned that creates images on demand
* for requested sizes from SVG.
* This has the advantage that only images for used sizes are created.
* Also if unusual sizes are requested (e.g. 18x18), then they are created from SVG.
* Also, if unusual sizes are requested (e.g. 18x18), then they are created from SVG.
* <p>
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
* Otherwise use {@link #createWindowIconImages(URL)}.
* Otherwise, use {@link #createWindowIconImages(URL)}.
*
* @param svgName the name of the SVG resource (a '/'-separated path)
* @return list of icon images with different sizes (16x16, 20x20, 24x24, 28x28, 32x32, 48x48 and 64x64)
@@ -69,7 +69,7 @@ public class FlatSVGUtils
* then a single multi-resolution image is returned that creates images on demand
* for requested sizes from SVG.
* This has the advantage that only images for used sizes are created.
* Also if unusual sizes are requested (e.g. 18x18), then they are created from SVG.
* Also, if unusual sizes are requested (e.g. 18x18), then they are created from SVG.
* <p>
* This method is useful if using Java modules and the package containing the SVG
* is not opened in {@code module-info.java}.
@@ -92,7 +92,7 @@ public class FlatSVGUtils
// any size is created on demand when
// MultiResolutionImage.getResolutionVariant(double destImageWidth, double destImageHeight)
// is invoked.
// This sizes are only used by MultiResolutionImage.getResolutionVariants().
// These sizes are only used by MultiResolutionImage.getResolutionVariants().
new Dimension( 16, 16 ), // 100%
new Dimension( 20, 20 ), // 125%
new Dimension( 24, 24 ), // 150%
@@ -120,7 +120,7 @@ public class FlatSVGUtils
* Creates a buffered image and renders the given SVG into it.
* <p>
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
* Otherwise use {@link #svg2image(URL, int, int)}.
* Otherwise, use {@link #svg2image(URL, int, int)}.
*
* @param svgName the name of the SVG resource (a '/'-separated path)
* @param width the width of the image
@@ -154,7 +154,7 @@ public class FlatSVGUtils
* Creates a buffered image and renders the given SVG into it.
* <p>
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
* Otherwise use {@link #svg2image(URL, float)}.
* Otherwise, use {@link #svg2image(URL, float)}.
*
* @param svgName the name of the SVG resource (a '/'-separated path)
* @param scaleFactor the amount by which the SVG size is scaled

View File

@@ -557,7 +557,7 @@ public class FlatUIDefaultsInspector
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
panel = new JPanel();
filterPanel = new JPanel();
flterLabel = new JLabel();
filterLabel = new JLabel();
filterField = new FlatTextField();
valueTypeLabel = new JLabel();
valueTypeField = new JComboBox<>();
@@ -580,11 +580,11 @@ public class FlatUIDefaultsInspector
((GridBagLayout)filterPanel.getLayout()).columnWeights = new double[] {0.0, 1.0, 0.0, 0.0, 1.0E-4};
((GridBagLayout)filterPanel.getLayout()).rowWeights = new double[] {0.0, 1.0E-4};
//---- flterLabel ----
flterLabel.setText("Filter:");
flterLabel.setLabelFor(filterField);
flterLabel.setDisplayedMnemonic('F');
filterPanel.add(flterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
//---- filterLabel ----
filterLabel.setText("Filter:");
filterLabel.setLabelFor(filterField);
filterLabel.setDisplayedMnemonic('F');
filterPanel.add(filterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
new Insets(0, 0, 0, 10), 0, 0));
@@ -668,7 +668,7 @@ public class FlatUIDefaultsInspector
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JPanel panel;
private JPanel filterPanel;
private JLabel flterLabel;
private JLabel filterLabel;
private FlatTextField filterField;
private JLabel valueTypeLabel;
private JComboBox<String> valueTypeField;

View File

@@ -15,7 +15,7 @@ new FormModel {
} ) {
name: "filterPanel"
add( new FormComponent( "javax.swing.JLabel" ) {
name: "flterLabel"
name: "filterLabel"
"text": "Filter:"
"labelFor": new FormReference( "filterField" )
"displayedMnemonic": 70

View File

@@ -33,14 +33,14 @@ public class FlatButton
public enum ButtonType { none, square, roundRect, tab, help, toolBarButton, borderless }
/**
* Returns type of a button.
* Returns type of button.
*/
public ButtonType getButtonType() {
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
}
/**
* Specifies type of a button.
* Specifies type of button.
*/
public void setButtonType( ButtonType buttonType ) {
if( buttonType == ButtonType.none )

View File

@@ -106,7 +106,7 @@ public class FlatFormattedTextField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/
@@ -135,7 +135,7 @@ public class FlatFormattedTextField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/

View File

@@ -106,7 +106,7 @@ public class FlatPasswordField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/
@@ -135,7 +135,7 @@ public class FlatPasswordField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/

View File

@@ -105,7 +105,7 @@ public class FlatTextField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/
@@ -134,7 +134,7 @@ public class FlatTextField
* The component should be not opaque because the text field border is painted
* slightly inside the usually visible border in some cases.
* E.g. when focused (in some themes) or when an outline color is specified
* (see {@link #setOutline(Object)}.
* (see {@link #setOutline(Object)}).
*
* @since 2
*/

View File

@@ -31,14 +31,14 @@ public class FlatToggleButton
implements FlatComponentExtension, FlatStyleableComponent
{
/**
* Returns type of a button.
* Returns type of button.
*/
public ButtonType getButtonType() {
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
}
/**
* Specifies type of a button.
* Specifies type of button.
*/
public void setButtonType( ButtonType buttonType ) {
if( buttonType == ButtonType.none )

View File

@@ -30,8 +30,8 @@ import com.formdev.flatlaf.FlatLaf;
* <p>
* The initial state is {@link State#INDETERMINATE}.
* <p>
* By default the third state is allowed and clicking on the checkbox cycles thru all
* three states. If you want that the user can cycle only thru two states, disallow
* By default, the third state is allowed and clicking on the checkbox cycles through all
* three states. If you want that the user can cycle only through two states, disallow
* intermediate state using {@link #setAllowIndeterminate(boolean)}. Then you can still
* set the indeterminate state via API if necessary, but the user can not.
* <p>

View File

@@ -18,8 +18,8 @@ package com.formdev.flatlaf.extras.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
*/