mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
fixed typos and grammar
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -62,7 +62,7 @@ build script:
|
||||
artifactId: flatlaf
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf)
|
||||
|
||||
@@ -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/)
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ReorderJarEntries
|
||||
// 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" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -71,7 +71,7 @@ class FlatInputMaps
|
||||
);
|
||||
}
|
||||
|
||||
// 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 ) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -203,7 +203,7 @@ class LinuxFontPolicy
|
||||
* 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
|
||||
|
||||
@@ -172,7 +172,7 @@ debug*/
|
||||
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();
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class FlatTabbedPaneCloseIcon
|
||||
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() ) );
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ public class FlatTreeOpenIcon
|
||||
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
|
||||
|
||||
@@ -71,7 +71,7 @@ public abstract class FlatWindowAbstractIcon
|
||||
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 );
|
||||
|
||||
|
||||
@@ -926,7 +926,7 @@ public class FlatComboBoxUI
|
||||
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
|
||||
@@ -944,7 +944,7 @@ public class FlatComboBoxUI
|
||||
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() ) );
|
||||
@@ -1090,7 +1090,7 @@ public class FlatComboBoxUI
|
||||
}
|
||||
|
||||
// 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;
|
||||
@@ -1242,7 +1242,7 @@ public class FlatComboBoxUI
|
||||
* 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
|
||||
|
||||
@@ -411,7 +411,7 @@ public class FlatListUI
|
||||
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;
|
||||
|
||||
@@ -78,7 +78,7 @@ class FlatNativeLibrary
|
||||
//
|
||||
// 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) ) {
|
||||
|
||||
@@ -263,7 +263,7 @@ public class FlatRadioButtonUI
|
||||
|
||||
@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)
|
||||
|
||||
@@ -245,7 +245,7 @@ public class FlatScrollBarUI
|
||||
// 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.
|
||||
|
||||
@@ -484,7 +484,7 @@ public class FlatTabbedPaneUI
|
||||
|
||||
// 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
|
||||
|
||||
@@ -183,7 +183,7 @@ public class FlatTableUI
|
||||
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() );
|
||||
@@ -222,11 +222,11 @@ public class FlatTableUI
|
||||
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 );
|
||||
|
||||
@@ -1264,7 +1264,7 @@ debug*/
|
||||
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() ) {
|
||||
|
||||
@@ -729,7 +729,7 @@ public class FlatUIUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ) {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class FontUtils
|
||||
|
||||
/**
|
||||
* 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() )
|
||||
@@ -109,7 +109,7 @@ public class FontUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
@@ -204,7 +204,7 @@ public class UIScale
|
||||
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.
|
||||
//
|
||||
|
||||
@@ -204,7 +204,7 @@ class TabsPanel
|
||||
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 );
|
||||
|
||||
@@ -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:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-extras)
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
} );
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -100,6 +100,6 @@ build script:
|
||||
artifactId: flatlaf-fonts-inter
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-fonts-inter-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-fonts-inter-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-inter)
|
||||
|
||||
@@ -81,6 +81,6 @@ build script:
|
||||
artifactId: flatlaf-fonts-jetbrains-mono
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-fonts-jetbrains-mono-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-fonts-jetbrains-mono-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-jetbrains-mono)
|
||||
|
||||
@@ -81,6 +81,6 @@ build script:
|
||||
artifactId: flatlaf-fonts-roboto-mono
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-fonts-roboto-mono-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-fonts-roboto-mono-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-roboto-mono)
|
||||
|
||||
@@ -97,6 +97,6 @@ build script:
|
||||
artifactId: flatlaf-fonts-roboto
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-fonts-roboto-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-fonts-roboto-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-roboto)
|
||||
|
||||
@@ -20,7 +20,7 @@ build script:
|
||||
artifactId: flatlaf-intellij-themes
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-intellij-themes-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-intellij-themes-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-intellij-themes)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ build script:
|
||||
artifactId: flatlaf-jide-oss
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-jide-oss-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-jide-oss-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-jide-oss)
|
||||
|
||||
|
||||
@@ -477,7 +477,7 @@ public class FlatJideTabbedPaneUI
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually does the nearly the same as super.paintContentBorder() but
|
||||
* Actually does nearly the same as super.paintContentBorder() but
|
||||
* - not invoking paintContentBorder*Edge() methods
|
||||
* - repaint selection
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,7 @@ public 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).
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ FlatLaf addon for SwingX
|
||||
This addon for FlatLaf adds support for **some** widely used SwingX components.
|
||||
|
||||
Many SwingX components that do not use UI delegates (e.g. `JXButton`, `JXLabel`,
|
||||
`JXList`, `JXStatusBar`, etc) work with FlatLaf without adaptation.
|
||||
`JXList`, `JXStatusBar`, etc.) work with FlatLaf without adaptation.
|
||||
|
||||
Following SwingX components, which use UI delegates, are currently supported by
|
||||
this addon:
|
||||
@@ -35,7 +35,7 @@ build script:
|
||||
artifactId: flatlaf-swingx
|
||||
version: (see button below)
|
||||
|
||||
Otherwise download `flatlaf-swingx-<version>.jar` here:
|
||||
Otherwise, download `flatlaf-swingx-<version>.jar` here:
|
||||
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-swingx)
|
||||
|
||||
|
||||
@@ -837,7 +837,7 @@ public class FlatDisabledIconsTest
|
||||
|
||||
// Calculate the average.
|
||||
// Sun's formula: Math.min(1.0f, (1f - avg) / (100.0f / 35.0f) + avg);
|
||||
// The following formula uses less operations and hence is faster.
|
||||
// The following formula uses fewer operations and hence is faster.
|
||||
avg = Math.min(1.0f, 0.35f + 0.65f * avg);
|
||||
// Convert back into RGB.
|
||||
return (int) (alpha * 255f) << 24 |
|
||||
|
||||
@@ -217,7 +217,7 @@ class FlatFindReplaceBar
|
||||
context.setReplaceWith( replaceField.getText() );
|
||||
|
||||
// make sure that search wrap is disabled because otherwise it is easy
|
||||
// to have endeless loop when replacing e.g. "a" with "aa"
|
||||
// to have endless loop when replacing e.g. "a" with "aa"
|
||||
boolean oldSearchWrap = context.getSearchWrap();
|
||||
context.setSearchWrap( false );
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ class FlatThemeFileEditor
|
||||
if( !themesDir.isDirectory() )
|
||||
return propertiesFiles;
|
||||
|
||||
// get files from "themes" sub-directory
|
||||
// get files from "themes" subdirectory
|
||||
File[] themesFiles = getPropertiesFiles( themesDir );
|
||||
File[] allFiles = new File[propertiesFiles.length + themesFiles.length];
|
||||
System.arraycopy( propertiesFiles, 0, allFiles, 0, propertiesFiles.length );
|
||||
|
||||
Reference in New Issue
Block a user