mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27: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
|
# test against
|
||||||
# - Java 8 (minimum requirement)
|
# - Java 8 (minimum requirement)
|
||||||
# - Java LTS versions (11, 17, ...)
|
# - Java LTS versions (11, 17, ...)
|
||||||
# - lastest Java version(s)
|
# - latest Java version(s)
|
||||||
java:
|
java:
|
||||||
- 8
|
- 8
|
||||||
- 11 # LTS
|
- 11 # LTS
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ build script:
|
|||||||
artifactId: flatlaf
|
artifactId: flatlaf
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf)
|
||||||
|
|
||||||
@@ -141,7 +141,6 @@ details and downloads.
|
|||||||
Buzz
|
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 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 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/)
|
- [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
|
// 1st pass: copy .properties files
|
||||||
copyFiles( zipOutStream, jarFile, name -> name.endsWith( ".properties" ) );
|
copyFiles( zipOutStream, jarFile, name -> name.endsWith( ".properties" ) );
|
||||||
|
|
||||||
// 2st pass: copy other files
|
// 2nd pass: copy other files
|
||||||
copyFiles( zipOutStream, jarFile, name -> !name.endsWith( ".properties" ) );
|
copyFiles( zipOutStream, jarFile, name -> !name.endsWith( ".properties" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public interface FlatClientProperties
|
|||||||
//---- JButton ------------------------------------------------------------
|
//---- JButton ------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies type of a button.
|
* Specifies type of button.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Components</strong> {@link javax.swing.JButton} and {@link javax.swing.JToggleButton}<br>
|
* <strong>Components</strong> {@link javax.swing.JButton} and {@link javax.swing.JToggleButton}<br>
|
||||||
* <strong>Value type</strong> {@link java.lang.String}<br>
|
* <strong>Value type</strong> {@link java.lang.String}<br>
|
||||||
@@ -421,10 +421,10 @@ public interface FlatClientProperties
|
|||||||
String TITLE_BAR_SHOW_TITLE = "JRootPane.titleBarShowTitle";
|
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}.
|
* (requires enabled window decorations). Default is {@code true}.
|
||||||
* <p>
|
* <p>
|
||||||
* Setting this shows/hides the "iconfify" button
|
* Setting this shows/hides the "iconify" button
|
||||||
* for the {@code JFrame} that contains the root pane.
|
* for the {@code JFrame} that contains the root pane.
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
|
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
|
||||||
@@ -506,7 +506,7 @@ public interface FlatClientProperties
|
|||||||
* On macOS, Java supports this out of the box.
|
* On macOS, Java supports this out of the box.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that this client property must be set before the window becomes displayable.
|
* 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>
|
* <p>
|
||||||
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
|
* <strong>Component</strong> {@link javax.swing.JRootPane}<br>
|
||||||
* <strong>Value type</strong> {@link java.lang.String}<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";
|
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>
|
* <p>
|
||||||
* <strong>Component</strong> {@link javax.swing.JTabbedPane}<br>
|
* <strong>Component</strong> {@link javax.swing.JTabbedPane}<br>
|
||||||
* <strong>Value type</strong> {@link java.lang.Integer} or {@link java.lang.String}<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.
|
* Tabs are rotated depending on tab placement.
|
||||||
* <p>
|
* <p>
|
||||||
* For top and bottom tab placement, the tabs are not rotated.<br>
|
* 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.
|
* For right tab placement, the tabs are rotated clockwise.
|
||||||
*
|
*
|
||||||
* @see #TABBED_PANE_TAB_ROTATION
|
* @see #TABBED_PANE_TAB_ROTATION
|
||||||
@@ -989,7 +989,7 @@ public interface FlatClientProperties
|
|||||||
String TABBED_PANE_TAB_ROTATION_AUTO = "auto";
|
String TABBED_PANE_TAB_ROTATION_AUTO = "auto";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tabs are rotated counter clockwise.
|
* Tabs are rotated counter-clockwise.
|
||||||
*
|
*
|
||||||
* @see #TABBED_PANE_TAB_ROTATION
|
* @see #TABBED_PANE_TAB_ROTATION
|
||||||
* @since 3.3
|
* @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[] bindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings" );
|
||||||
Object[] rtlBindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings.RightToLeft" );
|
Object[] rtlBindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings.RightToLeft" );
|
||||||
if( bindings != null && rtlBindings != null ) {
|
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}.
|
* in system properties {@code sun.boot.library.path} and {@code java.library.path}.
|
||||||
* (supported since FlatLaf 2.6)
|
* (supported since FlatLaf 2.6)
|
||||||
* <p>
|
* <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.
|
* then the embedded native library is extracted to the temporary directory and loaded from there.
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ class LinuxFontPolicy
|
|||||||
* Gets the default font for KDE from 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
|
* 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.
|
* This is the same behavior as in native KDE applications.
|
||||||
*
|
*
|
||||||
* The "display scale factor" (kdeglobals: [KScreen] > ScaleFactor) is not used
|
* The "display scale factor" (kdeglobals: [KScreen] > ScaleFactor) is not used
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ debug*/
|
|||||||
targetTopY = popupLocation.y;
|
targetTopY = popupLocation.y;
|
||||||
targetBottomY = popupLocation.y + popupSize.height;
|
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 )
|
if( subMenuEventQueue == null )
|
||||||
subMenuEventQueue = new SubMenuEventQueue();
|
subMenuEventQueue = new SubMenuEventQueue();
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class FlatTabbedPaneCloseIcon
|
|||||||
closeSize.width, closeSize.height, closeArc, closeArc );
|
closeSize.width, closeSize.height, closeArc, closeArc );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set cross color
|
// set color of cross
|
||||||
Color fg = FlatButtonUI.buttonStateColor( c, closeForeground, null, null, closeHoverForeground, closePressedForeground );
|
Color fg = FlatButtonUI.buttonStateColor( c, closeForeground, null, null, closeHoverForeground, closePressedForeground );
|
||||||
g.setColor( FlatUIUtils.deriveColor( fg, c.getForeground() ) );
|
g.setColor( FlatUIUtils.deriveColor( fg, c.getForeground() ) );
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ public class FlatTreeOpenIcon
|
|||||||
double arc = 1.5;
|
double arc = 1.5;
|
||||||
double arc2 = 0.5;
|
double arc2 = 0.5;
|
||||||
path = FlatUIUtils.createPath( false,
|
path = FlatUIUtils.createPath( false,
|
||||||
// bottom-left of opend part
|
// bottom-left of opened part
|
||||||
2,13.5,
|
2,13.5,
|
||||||
// top-left of opend part
|
// top-left of opened part
|
||||||
FlatUIUtils.ROUNDED, 4.5,7.5, arc,
|
FlatUIUtils.ROUNDED, 4.5,7.5, arc,
|
||||||
// top-right of opend part
|
// top-right of opened part
|
||||||
FlatUIUtils.ROUNDED, 15.5,7.5, arc2,
|
FlatUIUtils.ROUNDED, 15.5,7.5, arc2,
|
||||||
|
|
||||||
// bottom-right
|
// bottom-right
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public abstract class FlatWindowAbstractIcon
|
|||||||
protected void paintBackground( Component c, Graphics2D g ) {
|
protected void paintBackground( Component c, Graphics2D g ) {
|
||||||
Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground );
|
Color background = FlatButtonUI.buttonStateColor( c, null, null, null, hoverBackground, pressedBackground );
|
||||||
if( background != null ) {
|
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 );
|
Object oldHint = g.getRenderingHint( RenderingHints.KEY_ANTIALIASING );
|
||||||
g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
|
g.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
|
||||||
|
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ public class FlatComboBoxUI
|
|||||||
protected void configurePopup() {
|
protected void configurePopup() {
|
||||||
super.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 );
|
setOpaque( true );
|
||||||
|
|
||||||
// set popup border
|
// set popup border
|
||||||
@@ -944,7 +944,7 @@ public class FlatComboBoxUI
|
|||||||
if( popupBackground != null )
|
if( popupBackground != null )
|
||||||
list.setBackground( popupBackground );
|
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
|
// use non-UIResource to avoid that it is overwritten when making
|
||||||
// popup visible (see JPopupMenu.setInvoker()) in theme editor preview
|
// popup visible (see JPopupMenu.setInvoker()) in theme editor preview
|
||||||
setBackground( FlatUIUtils.nonUIResource( list.getBackground() ) );
|
setBackground( FlatUIUtils.nonUIResource( list.getBackground() ) );
|
||||||
@@ -1090,7 +1090,7 @@ public class FlatComboBoxUI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// using synchronized to avoid problems with code that modifies combo box
|
// 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 ) {
|
synchronized void install( Component c, int focusWidth ) {
|
||||||
if( !(c instanceof JComponent) )
|
if( !(c instanceof JComponent) )
|
||||||
return;
|
return;
|
||||||
@@ -1242,7 +1242,7 @@ public class FlatComboBoxUI
|
|||||||
* Key selection manager that delegates to the default manager.
|
* Key selection manager that delegates to the default manager.
|
||||||
* Shows the popup if Space key is pressed and "typed characters" buffer is empty.
|
* 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
|
* 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
|
private class FlatKeySelectionManager
|
||||||
implements JComboBox.KeySelectionManager, UIResource
|
implements JComboBox.KeySelectionManager, UIResource
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ public class FlatListUI
|
|||||||
int leftIndex = locationToIndex( list, new Point( r.x - 1, r.y ) );
|
int leftIndex = locationToIndex( list, new Point( r.x - 1, r.y ) );
|
||||||
int rightIndex = locationToIndex( list, new Point( r.x + r.width, 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();
|
boolean ltr = list.getComponentOrientation().isLeftToRight();
|
||||||
if( !ltr && leftIndex >= 0 && leftIndex != row && leftIndex == locationToIndex( list, new Point( r.x - 1, r.y - 1 ) ) )
|
if( !ltr && leftIndex >= 0 && leftIndex != row && leftIndex == locationToIndex( list, new Point( r.x - 1, r.y - 1 ) ) )
|
||||||
leftIndex = -1;
|
leftIndex = -1;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class FlatNativeLibrary
|
|||||||
//
|
//
|
||||||
// To avoid this, flatlaf.dll is not linked to jawt.dll,
|
// To avoid this, flatlaf.dll is not linked to jawt.dll,
|
||||||
// which avoids loading jawt.dll when flatlaf.dll is loaded.
|
// 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.
|
// which is guaranteed after AWT initialization.
|
||||||
|
|
||||||
} else if( SystemInfo.isMacOS_10_14_Mojave_orLater && (SystemInfo.isAARCH64 || SystemInfo.isX86_64) ) {
|
} else if( SystemInfo.isMacOS_10_14_Mojave_orLater && (SystemInfo.isAARCH64 || SystemInfo.isX86_64) ) {
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ public class FlatRadioButtonUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint( Graphics g, JComponent c ) {
|
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
|
// - contentAreaFilled is true and
|
||||||
// - if background color is different to default background color
|
// - if background color is different to default background color
|
||||||
// (this paints selection if using the component as cell renderer)
|
// (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.
|
// because scroll bars do not receive mouse exited event.
|
||||||
// The scroll pane, including its scroll bars, is not part
|
// The scroll pane, including its scroll bars, is not part
|
||||||
// of the component hierarchy and does not receive mouse events
|
// 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
|
// and delegates them to peers, but entered/exited events
|
||||||
// are sent only for the whole scroll pane.
|
// are sent only for the whole scroll pane.
|
||||||
// Exited event is only sent when mouse leaves 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
|
// At this point, BasicTabbedPaneUI already has installed
|
||||||
// TabbedPaneScrollLayout (in super.createLayoutManager()) and
|
// TabbedPaneScrollLayout (in super.createLayoutManager()) and
|
||||||
// ScrollableTabSupport, ScrollableTabViewport, ScrollableTabPanel, etc
|
// ScrollableTabSupport, ScrollableTabViewport, ScrollableTabPanel, etc.
|
||||||
// (in super.installComponents()).
|
// (in super.installComponents()).
|
||||||
|
|
||||||
// install own layout manager that delegates to original layout manager
|
// install own layout manager that delegates to original layout manager
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public class FlatTableUI
|
|||||||
else
|
else
|
||||||
table.addPropertyChangeListener( new FlatTablePropertyWatcher() );
|
table.addPropertyChangeListener( new FlatTablePropertyWatcher() );
|
||||||
|
|
||||||
// installl boolean renderer
|
// install boolean renderer
|
||||||
oldBooleanRenderer = table.getDefaultRenderer( Boolean.class );
|
oldBooleanRenderer = table.getDefaultRenderer( Boolean.class );
|
||||||
if( oldBooleanRenderer instanceof UIResource )
|
if( oldBooleanRenderer instanceof UIResource )
|
||||||
table.setDefaultRenderer( Boolean.class, new FlatBooleanRenderer() );
|
table.setDefaultRenderer( Boolean.class, new FlatBooleanRenderer() );
|
||||||
@@ -222,11 +222,11 @@ public class FlatTableUI
|
|||||||
if( watcher != null )
|
if( watcher != null )
|
||||||
watcher.enabled = true;
|
watcher.enabled = true;
|
||||||
|
|
||||||
// uninstalll boolean renderer
|
// uninstall boolean renderer
|
||||||
if( table.getDefaultRenderer( Boolean.class ) instanceof FlatBooleanRenderer ) {
|
if( table.getDefaultRenderer( Boolean.class ) instanceof FlatBooleanRenderer ) {
|
||||||
if( oldBooleanRenderer instanceof Component ) {
|
if( oldBooleanRenderer instanceof Component ) {
|
||||||
// because the old renderer component was not attached to any component hierearchy,
|
// 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
|
// its UI was not yet updated, and it is necessary to do it here
|
||||||
SwingUtilities.updateComponentTreeUI( (Component) oldBooleanRenderer );
|
SwingUtilities.updateComponentTreeUI( (Component) oldBooleanRenderer );
|
||||||
}
|
}
|
||||||
table.setDefaultRenderer( Boolean.class, oldBooleanRenderer );
|
table.setDefaultRenderer( Boolean.class, oldBooleanRenderer );
|
||||||
|
|||||||
@@ -1264,7 +1264,7 @@ debug*/
|
|||||||
public void mouseClicked( MouseEvent e ) {
|
public void mouseClicked( MouseEvent e ) {
|
||||||
// on Linux, when using native library, the mouse clicked event
|
// on Linux, when using native library, the mouse clicked event
|
||||||
// is usually not sent and maximize/restore is done in mouse pressed 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 ) ) {
|
if( linuxNativeMove && SystemInfo.isLinux && FlatNativeLinuxLibrary.isWMUtilsSupported( window ) ) {
|
||||||
// see comment in mousePressed()
|
// see comment in mousePressed()
|
||||||
if( lastSingleClickWhen != 0 && (e.getWhen() - lastSingleClickWhen) <= getMultiClickInterval() ) {
|
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).
|
* The given arc diameter is limited to min(width,height).
|
||||||
*/
|
*/
|
||||||
public static Shape createComponentRectangle( float x, float y, float w, float h, float arc ) {
|
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)}.
|
* 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 ) {
|
public static void loadFontFamily( String family ) {
|
||||||
if( !hasLoaders() )
|
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
|
* This invokes {@link GraphicsEnvironment#getAvailableFontFamilyNames()} and
|
||||||
* appends families registered for lazy loading via {@link #registerFontFamilyLoader(String, Runnable)}
|
* appends families registered for lazy loading via {@link #registerFontFamilyLoader(String, Runnable)}
|
||||||
* to the result.
|
* to the result.
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class UIScale
|
|||||||
if( SystemInfo.isWindows ) {
|
if( SystemInfo.isWindows ) {
|
||||||
// Special handling for Windows to be compatible with OS scaling,
|
// Special handling for Windows to be compatible with OS scaling,
|
||||||
// which distinguish between "screen scaling" and "text 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.
|
// and may have different scaling factors for each screen.
|
||||||
// - Windows "text scaling" increases only the font size, but on all screens.
|
// - Windows "text scaling" increases only the font size, but on all screens.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ class TabsPanel
|
|||||||
private void closeButtonStyleChanged() {
|
private void closeButtonStyleChanged() {
|
||||||
// WARNING:
|
// WARNING:
|
||||||
// Do not use this trick to style individual tabbed panes in own code.
|
// 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() ) {
|
if( circleCloseButton.isSelected() ) {
|
||||||
UIManager.put( "TabbedPane.closeArc", 999 );
|
UIManager.put( "TabbedPane.closeArc", 999 );
|
||||||
UIManager.put( "TabbedPane.closeCrossFilledSize", 5.5f );
|
UIManager.put( "TabbedPane.closeCrossFilledSize", 5.5f );
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ build script:
|
|||||||
artifactId: flatlaf-extras
|
artifactId: flatlaf-extras
|
||||||
version: (see button below)
|
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)
|
[](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()}
|
* 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.
|
* with a decreasing alpha. At the end, the snapshot is removed and the new UI is shown.
|
||||||
* Invoke after updating UI.
|
* Invoke after updating UI.
|
||||||
*/
|
*/
|
||||||
public static void hideSnapshotWithAnimation() {
|
public static void hideSnapshotWithAnimation() {
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class FlatDesktop
|
|||||||
(proxy, method, args) -> {
|
(proxy, method, args) -> {
|
||||||
// Use invokeLater to release the listener firing for the case
|
// Use invokeLater to release the listener firing for the case
|
||||||
// that the action listener shows a modal dialog.
|
// that the action listener shows a modal dialog.
|
||||||
// This (hopefully) prevents application hunging.
|
// This (hopefully) prevents application hanging.
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
handler.run();
|
handler.run();
|
||||||
} );
|
} );
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class FlatSVGIcon
|
|||||||
* in the tag {@code <svg>} are used as icon size.
|
* in the tag {@code <svg>} are used as icon size.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* 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.
|
* in the tag {@code <svg>} are used as icon size.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* 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.
|
* The icon is scaled if the given size is different to the size specified in the SVG file.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* 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.
|
* The icon is scaled if the given size is different to the size specified in the SVG file.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* This is cheap operation because the icon is only loaded when used.
|
||||||
*
|
*
|
||||||
@@ -166,7 +166,7 @@ public class FlatSVGIcon
|
|||||||
* by the given scale factor.
|
* by the given scale factor.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* This is cheap operation because the icon is only loaded when used.
|
||||||
*
|
*
|
||||||
@@ -187,7 +187,7 @@ public class FlatSVGIcon
|
|||||||
* by the given scale factor.
|
* by the given scale factor.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the icon must be opened in {@code module-info.java}.
|
* 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>
|
* <p>
|
||||||
* This is cheap operation because the icon is only loaded when used.
|
* This is cheap operation because the icon is only loaded when used.
|
||||||
*
|
*
|
||||||
@@ -259,7 +259,7 @@ public class FlatSVGIcon
|
|||||||
* <p>
|
* <p>
|
||||||
* The input stream is loaded, parsed and closed immediately.
|
* 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
|
* @throws IOException if an I/O exception occurs
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ public class FlatSVGUtils
|
|||||||
* then a single multi-resolution image is returned that creates images on demand
|
* then a single multi-resolution image is returned that creates images on demand
|
||||||
* for requested sizes from SVG.
|
* for requested sizes from SVG.
|
||||||
* This has the advantage that only images for used sizes are created.
|
* 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>
|
* <p>
|
||||||
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
|
* 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)
|
* @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)
|
* @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
|
* then a single multi-resolution image is returned that creates images on demand
|
||||||
* for requested sizes from SVG.
|
* for requested sizes from SVG.
|
||||||
* This has the advantage that only images for used sizes are created.
|
* 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>
|
* <p>
|
||||||
* This method is useful if using Java modules and the package containing the SVG
|
* This method is useful if using Java modules and the package containing the SVG
|
||||||
* is not opened in {@code module-info.java}.
|
* is not opened in {@code module-info.java}.
|
||||||
@@ -92,7 +92,7 @@ public class FlatSVGUtils
|
|||||||
// any size is created on demand when
|
// any size is created on demand when
|
||||||
// MultiResolutionImage.getResolutionVariant(double destImageWidth, double destImageHeight)
|
// MultiResolutionImage.getResolutionVariant(double destImageWidth, double destImageHeight)
|
||||||
// is invoked.
|
// 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( 16, 16 ), // 100%
|
||||||
new Dimension( 20, 20 ), // 125%
|
new Dimension( 20, 20 ), // 125%
|
||||||
new Dimension( 24, 24 ), // 150%
|
new Dimension( 24, 24 ), // 150%
|
||||||
@@ -120,7 +120,7 @@ public class FlatSVGUtils
|
|||||||
* Creates a buffered image and renders the given SVG into it.
|
* Creates a buffered image and renders the given SVG into it.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
|
* 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 svgName the name of the SVG resource (a '/'-separated path)
|
||||||
* @param width the width of the image
|
* @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.
|
* Creates a buffered image and renders the given SVG into it.
|
||||||
* <p>
|
* <p>
|
||||||
* If using Java modules, the package containing the SVG must be opened in {@code module-info.java}.
|
* 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 svgName the name of the SVG resource (a '/'-separated path)
|
||||||
* @param scaleFactor the amount by which the SVG size is scaled
|
* @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
|
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||||
panel = new JPanel();
|
panel = new JPanel();
|
||||||
filterPanel = new JPanel();
|
filterPanel = new JPanel();
|
||||||
flterLabel = new JLabel();
|
filterLabel = new JLabel();
|
||||||
filterField = new FlatTextField();
|
filterField = new FlatTextField();
|
||||||
valueTypeLabel = new JLabel();
|
valueTypeLabel = new JLabel();
|
||||||
valueTypeField = new JComboBox<>();
|
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()).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};
|
((GridBagLayout)filterPanel.getLayout()).rowWeights = new double[] {0.0, 1.0E-4};
|
||||||
|
|
||||||
//---- flterLabel ----
|
//---- filterLabel ----
|
||||||
flterLabel.setText("Filter:");
|
filterLabel.setText("Filter:");
|
||||||
flterLabel.setLabelFor(filterField);
|
filterLabel.setLabelFor(filterField);
|
||||||
flterLabel.setDisplayedMnemonic('F');
|
filterLabel.setDisplayedMnemonic('F');
|
||||||
filterPanel.add(flterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
|
filterPanel.add(filterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
|
||||||
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||||
new Insets(0, 0, 0, 10), 0, 0));
|
new Insets(0, 0, 0, 10), 0, 0));
|
||||||
|
|
||||||
@@ -668,7 +668,7 @@ public class FlatUIDefaultsInspector
|
|||||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||||
private JPanel panel;
|
private JPanel panel;
|
||||||
private JPanel filterPanel;
|
private JPanel filterPanel;
|
||||||
private JLabel flterLabel;
|
private JLabel filterLabel;
|
||||||
private FlatTextField filterField;
|
private FlatTextField filterField;
|
||||||
private JLabel valueTypeLabel;
|
private JLabel valueTypeLabel;
|
||||||
private JComboBox<String> valueTypeField;
|
private JComboBox<String> valueTypeField;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ new FormModel {
|
|||||||
} ) {
|
} ) {
|
||||||
name: "filterPanel"
|
name: "filterPanel"
|
||||||
add( new FormComponent( "javax.swing.JLabel" ) {
|
add( new FormComponent( "javax.swing.JLabel" ) {
|
||||||
name: "flterLabel"
|
name: "filterLabel"
|
||||||
"text": "Filter:"
|
"text": "Filter:"
|
||||||
"labelFor": new FormReference( "filterField" )
|
"labelFor": new FormReference( "filterField" )
|
||||||
"displayedMnemonic": 70
|
"displayedMnemonic": 70
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ public class FlatButton
|
|||||||
public enum ButtonType { none, square, roundRect, tab, help, toolBarButton, borderless }
|
public enum ButtonType { none, square, roundRect, tab, help, toolBarButton, borderless }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns type of a button.
|
* Returns type of button.
|
||||||
*/
|
*/
|
||||||
public ButtonType getButtonType() {
|
public ButtonType getButtonType() {
|
||||||
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
|
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies type of a button.
|
* Specifies type of button.
|
||||||
*/
|
*/
|
||||||
public void setButtonType( ButtonType buttonType ) {
|
public void setButtonType( ButtonType buttonType ) {
|
||||||
if( buttonType == ButtonType.none )
|
if( buttonType == ButtonType.none )
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class FlatFormattedTextField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,7 @@ public class FlatFormattedTextField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class FlatPasswordField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,7 @@ public class FlatPasswordField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class FlatTextField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
@@ -134,7 +134,7 @@ public class FlatTextField
|
|||||||
* The component should be not opaque because the text field border is painted
|
* The component should be not opaque because the text field border is painted
|
||||||
* slightly inside the usually visible border in some cases.
|
* slightly inside the usually visible border in some cases.
|
||||||
* E.g. when focused (in some themes) or when an outline color is specified
|
* E.g. when focused (in some themes) or when an outline color is specified
|
||||||
* (see {@link #setOutline(Object)}.
|
* (see {@link #setOutline(Object)}).
|
||||||
*
|
*
|
||||||
* @since 2
|
* @since 2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ public class FlatToggleButton
|
|||||||
implements FlatComponentExtension, FlatStyleableComponent
|
implements FlatComponentExtension, FlatStyleableComponent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns type of a button.
|
* Returns type of button.
|
||||||
*/
|
*/
|
||||||
public ButtonType getButtonType() {
|
public ButtonType getButtonType() {
|
||||||
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
|
return getClientPropertyEnumString( BUTTON_TYPE, ButtonType.class, null, ButtonType.none );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies type of a button.
|
* Specifies type of button.
|
||||||
*/
|
*/
|
||||||
public void setButtonType( ButtonType buttonType ) {
|
public void setButtonType( ButtonType buttonType ) {
|
||||||
if( buttonType == ButtonType.none )
|
if( buttonType == ButtonType.none )
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ import com.formdev.flatlaf.FlatLaf;
|
|||||||
* <p>
|
* <p>
|
||||||
* The initial state is {@link State#INDETERMINATE}.
|
* The initial state is {@link State#INDETERMINATE}.
|
||||||
* <p>
|
* <p>
|
||||||
* By default the third state is allowed and clicking on the checkbox cycles thru all
|
* 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 thru two states, disallow
|
* 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
|
* intermediate state using {@link #setAllowIndeterminate(boolean)}. Then you can still
|
||||||
* set the indeterminate state via API if necessary, but the user can not.
|
* set the indeterminate state via API if necessary, but the user can not.
|
||||||
* <p>
|
* <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.
|
* 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.
|
* 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.
|
* Also, when using --patch-module (e.g. from an IDE), an error would occur for empty packages.
|
||||||
*
|
*
|
||||||
* @author Karl Tauber
|
* @author Karl Tauber
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -100,6 +100,6 @@ build script:
|
|||||||
artifactId: flatlaf-fonts-inter
|
artifactId: flatlaf-fonts-inter
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-inter)
|
||||||
|
|||||||
@@ -81,6 +81,6 @@ build script:
|
|||||||
artifactId: flatlaf-fonts-jetbrains-mono
|
artifactId: flatlaf-fonts-jetbrains-mono
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-jetbrains-mono)
|
||||||
|
|||||||
@@ -81,6 +81,6 @@ build script:
|
|||||||
artifactId: flatlaf-fonts-roboto-mono
|
artifactId: flatlaf-fonts-roboto-mono
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-roboto-mono)
|
||||||
|
|||||||
@@ -97,6 +97,6 @@ build script:
|
|||||||
artifactId: flatlaf-fonts-roboto
|
artifactId: flatlaf-fonts-roboto
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-fonts-roboto)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ build script:
|
|||||||
artifactId: flatlaf-intellij-themes
|
artifactId: flatlaf-intellij-themes
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-intellij-themes)
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ build script:
|
|||||||
artifactId: flatlaf-jide-oss
|
artifactId: flatlaf-jide-oss
|
||||||
version: (see button below)
|
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)
|
[](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
|
* - not invoking paintContentBorder*Edge() methods
|
||||||
* - repaint selection
|
* - 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,
|
* If {@code true}, the Windows 10 title bar is hidden (including minimize,
|
||||||
* maximize and close buttons), but not the resize borders (including drop shadow).
|
* 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.
|
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`,
|
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
|
Following SwingX components, which use UI delegates, are currently supported by
|
||||||
this addon:
|
this addon:
|
||||||
@@ -35,7 +35,7 @@ build script:
|
|||||||
artifactId: flatlaf-swingx
|
artifactId: flatlaf-swingx
|
||||||
version: (see button below)
|
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)
|
[](https://maven-badges.herokuapp.com/maven-central/com.formdev/flatlaf-swingx)
|
||||||
|
|
||||||
|
|||||||
@@ -837,7 +837,7 @@ public class FlatDisabledIconsTest
|
|||||||
|
|
||||||
// Calculate the average.
|
// Calculate the average.
|
||||||
// Sun's formula: Math.min(1.0f, (1f - avg) / (100.0f / 35.0f) + avg);
|
// 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);
|
avg = Math.min(1.0f, 0.35f + 0.65f * avg);
|
||||||
// Convert back into RGB.
|
// Convert back into RGB.
|
||||||
return (int) (alpha * 255f) << 24 |
|
return (int) (alpha * 255f) << 24 |
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class FlatFindReplaceBar
|
|||||||
context.setReplaceWith( replaceField.getText() );
|
context.setReplaceWith( replaceField.getText() );
|
||||||
|
|
||||||
// make sure that search wrap is disabled because otherwise it is easy
|
// 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();
|
boolean oldSearchWrap = context.getSearchWrap();
|
||||||
context.setSearchWrap( false );
|
context.setSearchWrap( false );
|
||||||
|
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ class FlatThemeFileEditor
|
|||||||
if( !themesDir.isDirectory() )
|
if( !themesDir.isDirectory() )
|
||||||
return propertiesFiles;
|
return propertiesFiles;
|
||||||
|
|
||||||
// get files from "themes" sub-directory
|
// get files from "themes" subdirectory
|
||||||
File[] themesFiles = getPropertiesFiles( themesDir );
|
File[] themesFiles = getPropertiesFiles( themesDir );
|
||||||
File[] allFiles = new File[propertiesFiles.length + themesFiles.length];
|
File[] allFiles = new File[propertiesFiles.length + themesFiles.length];
|
||||||
System.arraycopy( propertiesFiles, 0, allFiles, 0, propertiesFiles.length );
|
System.arraycopy( propertiesFiles, 0, allFiles, 0, propertiesFiles.length );
|
||||||
|
|||||||
Reference in New Issue
Block a user