mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd7b7c6aef | ||
|
|
0bd677c46b | ||
|
|
1a131d5206 | ||
|
|
016e515ae2 | ||
|
|
456ceb3c58 | ||
|
|
2169be1b45 | ||
|
|
49eb0b0201 | ||
|
|
2e222bcdea | ||
|
|
c7fa475128 | ||
|
|
4174b065f3 | ||
|
|
df6256d989 | ||
|
|
c27db56321 | ||
|
|
97bed8554a | ||
|
|
751c0e16e9 | ||
|
|
936de60700 | ||
|
|
f6b64d48ec | ||
|
|
b043da7d4c | ||
|
|
7e47cc2443 | ||
|
|
b8b45f9442 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,6 +1,28 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## 2.0.2
|
||||||
|
|
||||||
|
- Native window decorations (Windows 10/11 only): Fixed rendering artifacts on
|
||||||
|
HiDPI screens when dragging window partly offscreen and back into screen
|
||||||
|
bounds. (issue #477)
|
||||||
|
- Repaint component when setting client property `JComponent.outline` (issue
|
||||||
|
#480).
|
||||||
|
- macOS: Fixed NPE when using some icons in main menu items. (issue #483)
|
||||||
|
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
- Fixed memory leak in Panel, Separator and ToolBarSeparator. (issue #471;
|
||||||
|
regression in FlatLaf 2.0)
|
||||||
|
- ToolTip: Fixed wrong tooltip location if component overrides
|
||||||
|
`JComponent.getToolTipLocation()` and wants place tooltip under mouse
|
||||||
|
location. (issue #468)
|
||||||
|
- Extras: Added copy constructor to `FlatSVGIcon`. (issue #465)
|
||||||
|
- Moved `module-info.class` from `META-INF\versions\9\` to root folder of JARs.
|
||||||
|
(issue #466)
|
||||||
|
|
||||||
|
|
||||||
## 2.0
|
## 2.0
|
||||||
|
|
||||||
- Added system property `flatlaf.nativeLibraryPath` to load native libraries
|
- Added system property `flatlaf.nativeLibraryPath` to load native libraries
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -11,9 +11,9 @@ scales on **HiDPI** displays and runs on Java 8 or newer.
|
|||||||
The look is heavily inspired by **Darcula** and **IntelliJ** themes from
|
The look is heavily inspired by **Darcula** and **IntelliJ** themes from
|
||||||
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
|
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
IntelliJ Platform Themes
|
IntelliJ Platform Themes
|
||||||
@@ -105,6 +105,16 @@ For more information and documentation visit
|
|||||||
- [System Properties](https://www.formdev.com/flatlaf/system-properties/)
|
- [System Properties](https://www.formdev.com/flatlaf/system-properties/)
|
||||||
|
|
||||||
|
|
||||||
|
Theme Editor
|
||||||
|
------------
|
||||||
|
|
||||||
|
The Theme Editor that supports editing FlatLaf theme properties files. See
|
||||||
|
[Theme Editor documentation](https://www.formdev.com/flatlaf/theme-editor/) for
|
||||||
|
details and downloads.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
Buzz
|
Buzz
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -116,6 +126,8 @@ Buzz
|
|||||||
Applications using FlatLaf
|
Applications using FlatLaf
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
-  [Ultorg](https://www.ultorg.com/) (**commercial**) - a
|
||||||
|
visual query system for relational databases
|
||||||
-  [MooInfo](https://github.com/rememberber/MooInfo) -
|
-  [MooInfo](https://github.com/rememberber/MooInfo) -
|
||||||
visual implementation of OSHI, to view information about the system and
|
visual implementation of OSHI, to view information about the system and
|
||||||
hardware
|
hardware
|
||||||
@@ -154,9 +166,10 @@ Applications using FlatLaf
|
|||||||
- [Total Validator](https://www.totalvalidator.com/) 15 (**commercial**) -
|
- [Total Validator](https://www.totalvalidator.com/) 15 (**commercial**) -
|
||||||
checks your website
|
checks your website
|
||||||
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org) - Kanzleisoftware
|
- [j-lawyer](https://github.com/jlawyerorg/j-lawyer-org) - Kanzleisoftware
|
||||||
- [MegaMek](https://github.com/MegaMek/megamek) v0.47.4 and
|
- [MegaMek](https://github.com/MegaMek/megamek),
|
||||||
[MekHQ](https://github.com/MegaMek/mekhq) v0.47.5 - a turn-based sci-fi board
|
[MegaMekLab](https://github.com/MegaMek/megameklab) and
|
||||||
game
|
[MekHQ](https://github.com/MegaMek/mekhq) v0.47.5+ - a sci-fi tabletop
|
||||||
|
BattleTech simulator suite handling battles, unit building, and campaigns
|
||||||
- [GUIslice Builder](https://github.com/ImpulseAdventure/GUIslice-Builder)
|
- [GUIslice Builder](https://github.com/ImpulseAdventure/GUIslice-Builder)
|
||||||
0.13.b024 - GUI builder for
|
0.13.b024 - GUI builder for
|
||||||
[GUIslice](https://github.com/ImpulseAdventure/GUIslice), a lightweight GUI
|
[GUIslice](https://github.com/ImpulseAdventure/GUIslice), a lightweight GUI
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
val releaseVersion = "2.0"
|
val releaseVersion = "2.0.2"
|
||||||
val developmentVersion = "2.1-SNAPSHOT"
|
val developmentVersion = "2.1-SNAPSHOT"
|
||||||
|
|
||||||
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
|
||||||
|
|||||||
@@ -63,11 +63,9 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
|
|||||||
jar {
|
jar {
|
||||||
manifest.attributes( "Multi-Release" to "true" )
|
manifest.attributes( "Multi-Release" to "true" )
|
||||||
|
|
||||||
into( "META-INF/versions/9" ) {
|
|
||||||
from( sourceSets["module-info"].output ) {
|
from( sourceSets["module-info"].output ) {
|
||||||
include( "module-info.class" )
|
include( "module-info.class" )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#Signature file v4.1
|
#Signature file v4.1
|
||||||
#Version 1.6
|
#Version 2.0
|
||||||
|
|
||||||
CLSS public abstract interface com.formdev.flatlaf.FlatClientProperties
|
CLSS public abstract interface com.formdev.flatlaf.FlatClientProperties
|
||||||
fld public final static java.lang.String BUTTON_TYPE = "JButton.buttonType"
|
fld public final static java.lang.String BUTTON_TYPE = "JButton.buttonType"
|
||||||
@@ -31,6 +31,8 @@ fld public final static java.lang.String SELECT_ALL_ON_FOCUS_POLICY_ALWAYS = "al
|
|||||||
fld public final static java.lang.String SELECT_ALL_ON_FOCUS_POLICY_NEVER = "never"
|
fld public final static java.lang.String SELECT_ALL_ON_FOCUS_POLICY_NEVER = "never"
|
||||||
fld public final static java.lang.String SELECT_ALL_ON_FOCUS_POLICY_ONCE = "once"
|
fld public final static java.lang.String SELECT_ALL_ON_FOCUS_POLICY_ONCE = "once"
|
||||||
fld public final static java.lang.String SQUARE_SIZE = "JButton.squareSize"
|
fld public final static java.lang.String SQUARE_SIZE = "JButton.squareSize"
|
||||||
|
fld public final static java.lang.String STYLE = "FlatLaf.style"
|
||||||
|
fld public final static java.lang.String STYLE_CLASS = "FlatLaf.styleClass"
|
||||||
fld public final static java.lang.String TABBED_PANE_ALIGN_CENTER = "center"
|
fld public final static java.lang.String TABBED_PANE_ALIGN_CENTER = "center"
|
||||||
fld public final static java.lang.String TABBED_PANE_ALIGN_FILL = "fill"
|
fld public final static java.lang.String TABBED_PANE_ALIGN_FILL = "fill"
|
||||||
fld public final static java.lang.String TABBED_PANE_ALIGN_LEADING = "leading"
|
fld public final static java.lang.String TABBED_PANE_ALIGN_LEADING = "leading"
|
||||||
@@ -59,6 +61,9 @@ fld public final static java.lang.String TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT = "JT
|
|||||||
fld public final static java.lang.String TABBED_PANE_TAB_HEIGHT = "JTabbedPane.tabHeight"
|
fld public final static java.lang.String TABBED_PANE_TAB_HEIGHT = "JTabbedPane.tabHeight"
|
||||||
fld public final static java.lang.String TABBED_PANE_TAB_ICON_PLACEMENT = "JTabbedPane.tabIconPlacement"
|
fld public final static java.lang.String TABBED_PANE_TAB_ICON_PLACEMENT = "JTabbedPane.tabIconPlacement"
|
||||||
fld public final static java.lang.String TABBED_PANE_TAB_INSETS = "JTabbedPane.tabInsets"
|
fld public final static java.lang.String TABBED_PANE_TAB_INSETS = "JTabbedPane.tabInsets"
|
||||||
|
fld public final static java.lang.String TABBED_PANE_TAB_TYPE = "JTabbedPane.tabType"
|
||||||
|
fld public final static java.lang.String TABBED_PANE_TAB_TYPE_CARD = "card"
|
||||||
|
fld public final static java.lang.String TABBED_PANE_TAB_TYPE_UNDERLINED = "underlined"
|
||||||
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE = "JTabbedPane.tabWidthMode"
|
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE = "JTabbedPane.tabWidthMode"
|
||||||
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE_COMPACT = "compact"
|
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE_COMPACT = "compact"
|
||||||
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE_EQUAL = "equal"
|
fld public final static java.lang.String TABBED_PANE_TAB_WIDTH_MODE_EQUAL = "equal"
|
||||||
@@ -67,12 +72,20 @@ fld public final static java.lang.String TABBED_PANE_TRAILING_COMPONENT = "JTabb
|
|||||||
fld public final static java.lang.String TAB_BUTTON_SELECTED_BACKGROUND = "JToggleButton.tab.selectedBackground"
|
fld public final static java.lang.String TAB_BUTTON_SELECTED_BACKGROUND = "JToggleButton.tab.selectedBackground"
|
||||||
fld public final static java.lang.String TAB_BUTTON_UNDERLINE_COLOR = "JToggleButton.tab.underlineColor"
|
fld public final static java.lang.String TAB_BUTTON_UNDERLINE_COLOR = "JToggleButton.tab.underlineColor"
|
||||||
fld public final static java.lang.String TAB_BUTTON_UNDERLINE_HEIGHT = "JToggleButton.tab.underlineHeight"
|
fld public final static java.lang.String TAB_BUTTON_UNDERLINE_HEIGHT = "JToggleButton.tab.underlineHeight"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_CLEAR_CALLBACK = "JTextField.clearCallback"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_LEADING_COMPONENT = "JTextField.leadingComponent"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_LEADING_ICON = "JTextField.leadingIcon"
|
||||||
fld public final static java.lang.String TEXT_FIELD_PADDING = "JTextField.padding"
|
fld public final static java.lang.String TEXT_FIELD_PADDING = "JTextField.padding"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_SHOW_CLEAR_BUTTON = "JTextField.showClearButton"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_TRAILING_COMPONENT = "JTextField.trailingComponent"
|
||||||
|
fld public final static java.lang.String TEXT_FIELD_TRAILING_ICON = "JTextField.trailingIcon"
|
||||||
fld public final static java.lang.String TITLE_BAR_BACKGROUND = "JRootPane.titleBarBackground"
|
fld public final static java.lang.String TITLE_BAR_BACKGROUND = "JRootPane.titleBarBackground"
|
||||||
fld public final static java.lang.String TITLE_BAR_FOREGROUND = "JRootPane.titleBarForeground"
|
fld public final static java.lang.String TITLE_BAR_FOREGROUND = "JRootPane.titleBarForeground"
|
||||||
|
fld public final static java.lang.String TITLE_BAR_SHOW_ICON = "JRootPane.titleBarShowIcon"
|
||||||
fld public final static java.lang.String TREE_PAINT_SELECTION = "JTree.paintSelection"
|
fld public final static java.lang.String TREE_PAINT_SELECTION = "JTree.paintSelection"
|
||||||
fld public final static java.lang.String TREE_WIDE_SELECTION = "JTree.wideSelection"
|
fld public final static java.lang.String TREE_WIDE_SELECTION = "JTree.wideSelection"
|
||||||
fld public final static java.lang.String USE_WINDOW_DECORATIONS = "JRootPane.useWindowDecorations"
|
fld public final static java.lang.String USE_WINDOW_DECORATIONS = "JRootPane.useWindowDecorations"
|
||||||
|
meth public static <%0 extends java.lang.Object> {%%0} clientProperty(javax.swing.JComponent,java.lang.String,{%%0},java.lang.Class<{%%0}>)
|
||||||
meth public static boolean clientPropertyBoolean(javax.swing.JComponent,java.lang.String,boolean)
|
meth public static boolean clientPropertyBoolean(javax.swing.JComponent,java.lang.String,boolean)
|
||||||
meth public static boolean clientPropertyEquals(javax.swing.JComponent,java.lang.String,java.lang.Object)
|
meth public static boolean clientPropertyEquals(javax.swing.JComponent,java.lang.String,java.lang.Object)
|
||||||
meth public static int clientPropertyInt(javax.swing.JComponent,java.lang.String,int)
|
meth public static int clientPropertyInt(javax.swing.JComponent,java.lang.String,int)
|
||||||
@@ -165,6 +178,7 @@ meth public boolean isSupportedLookAndFeel()
|
|||||||
meth public final boolean equals(java.lang.Object)
|
meth public final boolean equals(java.lang.Object)
|
||||||
meth public final int hashCode()
|
meth public final int hashCode()
|
||||||
meth public java.lang.String getID()
|
meth public java.lang.String getID()
|
||||||
|
meth public java.util.Map<java.lang.String,java.lang.String> getExtraDefaults()
|
||||||
meth public javax.swing.Icon getDisabledIcon(javax.swing.JComponent,javax.swing.Icon)
|
meth public javax.swing.Icon getDisabledIcon(javax.swing.JComponent,javax.swing.Icon)
|
||||||
meth public javax.swing.UIDefaults getDefaults()
|
meth public javax.swing.UIDefaults getDefaults()
|
||||||
meth public static boolean install(javax.swing.LookAndFeel)
|
meth public static boolean install(javax.swing.LookAndFeel)
|
||||||
@@ -174,6 +188,8 @@ meth public static boolean isShowMnemonics()
|
|||||||
meth public static boolean isUseNativeWindowDecorations()
|
meth public static boolean isUseNativeWindowDecorations()
|
||||||
meth public static boolean setup(javax.swing.LookAndFeel)
|
meth public static boolean setup(javax.swing.LookAndFeel)
|
||||||
meth public static boolean supportsNativeWindowDecorations()
|
meth public static boolean supportsNativeWindowDecorations()
|
||||||
|
meth public static java.lang.Object parseDefaultsValue(java.lang.String,java.lang.String,java.lang.Class<?>)
|
||||||
|
meth public static java.util.Map<java.lang.String,java.lang.String> getGlobalExtraDefaults()
|
||||||
meth public static javax.swing.UIDefaults$ActiveValue createActiveFontValue(float)
|
meth public static javax.swing.UIDefaults$ActiveValue createActiveFontValue(float)
|
||||||
meth public static void hideMnemonics()
|
meth public static void hideMnemonics()
|
||||||
meth public static void initIconColors(javax.swing.UIDefaults,boolean)
|
meth public static void initIconColors(javax.swing.UIDefaults,boolean)
|
||||||
@@ -181,22 +197,26 @@ meth public static void installLafInfo(java.lang.String,java.lang.Class<? extend
|
|||||||
meth public static void registerCustomDefaultsSource(java.io.File)
|
meth public static void registerCustomDefaultsSource(java.io.File)
|
||||||
meth public static void registerCustomDefaultsSource(java.lang.String)
|
meth public static void registerCustomDefaultsSource(java.lang.String)
|
||||||
meth public static void registerCustomDefaultsSource(java.lang.String,java.lang.ClassLoader)
|
meth public static void registerCustomDefaultsSource(java.lang.String,java.lang.ClassLoader)
|
||||||
|
meth public static void registerCustomDefaultsSource(java.net.URL)
|
||||||
meth public static void repaintAllFramesAndDialogs()
|
meth public static void repaintAllFramesAndDialogs()
|
||||||
meth public static void revalidateAndRepaintAllFramesAndDialogs()
|
meth public static void revalidateAndRepaintAllFramesAndDialogs()
|
||||||
meth public static void runWithUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>,java.lang.Runnable)
|
meth public static void runWithUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>,java.lang.Runnable)
|
||||||
|
meth public static void setGlobalExtraDefaults(java.util.Map<java.lang.String,java.lang.String>)
|
||||||
meth public static void setUseNativeWindowDecorations(boolean)
|
meth public static void setUseNativeWindowDecorations(boolean)
|
||||||
meth public static void showMnemonics(java.awt.Component)
|
meth public static void showMnemonics(java.awt.Component)
|
||||||
meth public static void unregisterCustomDefaultsSource(java.io.File)
|
meth public static void unregisterCustomDefaultsSource(java.io.File)
|
||||||
meth public static void unregisterCustomDefaultsSource(java.lang.String)
|
meth public static void unregisterCustomDefaultsSource(java.lang.String)
|
||||||
meth public static void unregisterCustomDefaultsSource(java.lang.String,java.lang.ClassLoader)
|
meth public static void unregisterCustomDefaultsSource(java.lang.String,java.lang.ClassLoader)
|
||||||
|
meth public static void unregisterCustomDefaultsSource(java.net.URL)
|
||||||
meth public static void updateUI()
|
meth public static void updateUI()
|
||||||
meth public static void updateUILater()
|
meth public static void updateUILater()
|
||||||
meth public void initialize()
|
meth public void initialize()
|
||||||
meth public void registerUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>)
|
meth public void registerUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>)
|
||||||
|
meth public void setExtraDefaults(java.util.Map<java.lang.String,java.lang.String>)
|
||||||
meth public void uninitialize()
|
meth public void uninitialize()
|
||||||
meth public void unregisterUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>)
|
meth public void unregisterUIDefaultsGetter(java.util.function.Function<java.lang.Object,java.lang.Object>)
|
||||||
supr javax.swing.plaf.basic.BasicLookAndFeel
|
supr javax.swing.plaf.basic.BasicLookAndFeel
|
||||||
hfds DESKTOPFONTHINTS,aquaLoaded,customDefaultsSources,desktopPropertyListener,desktopPropertyName,desktopPropertyName2,mnemonicHandler,oldPopupFactory,postInitialization,uiDefaultsGetters,updateUIPending
|
hfds DESKTOPFONTHINTS,aquaLoaded,customDefaultsSources,desktopPropertyListener,desktopPropertyName,desktopPropertyName2,extraDefaults,globalExtraDefaults,mnemonicHandler,oldPopupFactory,postInitialization,uiDefaultsGetters,updateUIPending
|
||||||
hcls ActiveFont,FlatUIDefaults,ImageIconUIResource
|
hcls ActiveFont,FlatUIDefaults,ImageIconUIResource
|
||||||
|
|
||||||
CLSS public abstract interface static com.formdev.flatlaf.FlatLaf$DisabledIconProvider
|
CLSS public abstract interface static com.formdev.flatlaf.FlatLaf$DisabledIconProvider
|
||||||
@@ -231,6 +251,7 @@ hfds baseTheme,dark,name,properties
|
|||||||
CLSS public abstract interface com.formdev.flatlaf.FlatSystemProperties
|
CLSS public abstract interface com.formdev.flatlaf.FlatSystemProperties
|
||||||
fld public final static java.lang.String ANIMATION = "flatlaf.animation"
|
fld public final static java.lang.String ANIMATION = "flatlaf.animation"
|
||||||
fld public final static java.lang.String MENUBAR_EMBEDDED = "flatlaf.menuBarEmbedded"
|
fld public final static java.lang.String MENUBAR_EMBEDDED = "flatlaf.menuBarEmbedded"
|
||||||
|
fld public final static java.lang.String NATIVE_LIBRARY_PATH = "flatlaf.nativeLibraryPath"
|
||||||
fld public final static java.lang.String UI_SCALE = "flatlaf.uiScale"
|
fld public final static java.lang.String UI_SCALE = "flatlaf.uiScale"
|
||||||
fld public final static java.lang.String UI_SCALE_ALLOW_SCALE_DOWN = "flatlaf.uiScale.allowScaleDown"
|
fld public final static java.lang.String UI_SCALE_ALLOW_SCALE_DOWN = "flatlaf.uiScale.allowScaleDown"
|
||||||
fld public final static java.lang.String UI_SCALE_ENABLED = "flatlaf.uiScale.enabled"
|
fld public final static java.lang.String UI_SCALE_ENABLED = "flatlaf.uiScale.enabled"
|
||||||
@@ -330,7 +351,15 @@ innr public static HSLIncreaseDecrease
|
|||||||
innr public static Mix
|
innr public static Mix
|
||||||
meth public !varargs static java.awt.Color applyFunctions(java.awt.Color,com.formdev.flatlaf.util.ColorFunctions$ColorFunction[])
|
meth public !varargs static java.awt.Color applyFunctions(java.awt.Color,com.formdev.flatlaf.util.ColorFunctions$ColorFunction[])
|
||||||
meth public static float clamp(float)
|
meth public static float clamp(float)
|
||||||
|
meth public static float luma(java.awt.Color)
|
||||||
|
meth public static java.awt.Color darken(java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color desaturate(java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color lighten(java.awt.Color,float)
|
||||||
meth public static java.awt.Color mix(java.awt.Color,java.awt.Color,float)
|
meth public static java.awt.Color mix(java.awt.Color,java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color saturate(java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color shade(java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color spin(java.awt.Color,float)
|
||||||
|
meth public static java.awt.Color tint(java.awt.Color,float)
|
||||||
supr java.lang.Object
|
supr java.lang.Object
|
||||||
|
|
||||||
CLSS public abstract interface static com.formdev.flatlaf.util.ColorFunctions$ColorFunction
|
CLSS public abstract interface static com.formdev.flatlaf.util.ColorFunctions$ColorFunction
|
||||||
@@ -566,6 +595,7 @@ meth public static java.util.List<java.awt.Image> getResolutionVariants(java.awt
|
|||||||
supr java.lang.Object
|
supr java.lang.Object
|
||||||
|
|
||||||
CLSS public com.formdev.flatlaf.util.NativeLibrary
|
CLSS public com.formdev.flatlaf.util.NativeLibrary
|
||||||
|
cons public init(java.io.File,boolean)
|
||||||
cons public init(java.lang.String,java.lang.ClassLoader,boolean)
|
cons public init(java.lang.String,java.lang.ClassLoader,boolean)
|
||||||
meth public boolean isLoaded()
|
meth public boolean isLoaded()
|
||||||
supr java.lang.Object
|
supr java.lang.Object
|
||||||
@@ -589,18 +619,52 @@ meth public void paintIcon(java.awt.Component,java.awt.Graphics,int,int)
|
|||||||
supr java.lang.Object
|
supr java.lang.Object
|
||||||
hfds iconHeight,iconWidth,imageIcon,lastImage,lastSystemScaleFactor,lastUserScaleFactor
|
hfds iconHeight,iconWidth,imageIcon,lastImage,lastSystemScaleFactor,lastUserScaleFactor
|
||||||
|
|
||||||
|
CLSS public com.formdev.flatlaf.util.SoftCache<%0 extends java.lang.Object, %1 extends java.lang.Object>
|
||||||
|
cons public init()
|
||||||
|
cons public init(int)
|
||||||
|
intf java.util.Map<{com.formdev.flatlaf.util.SoftCache%0},{com.formdev.flatlaf.util.SoftCache%1}>
|
||||||
|
meth public boolean containsKey(java.lang.Object)
|
||||||
|
meth public boolean containsValue(java.lang.Object)
|
||||||
|
meth public boolean isEmpty()
|
||||||
|
meth public int size()
|
||||||
|
meth public java.util.Collection<{com.formdev.flatlaf.util.SoftCache%1}> values()
|
||||||
|
meth public java.util.Set<java.util.Map$Entry<{com.formdev.flatlaf.util.SoftCache%0},{com.formdev.flatlaf.util.SoftCache%1}>> entrySet()
|
||||||
|
meth public java.util.Set<{com.formdev.flatlaf.util.SoftCache%0}> keySet()
|
||||||
|
meth public void clear()
|
||||||
|
meth public void forEach(java.util.function.BiConsumer<? super {com.formdev.flatlaf.util.SoftCache%0},? super {com.formdev.flatlaf.util.SoftCache%1}>)
|
||||||
|
meth public void putAll(java.util.Map<? extends {com.formdev.flatlaf.util.SoftCache%0},? extends {com.formdev.flatlaf.util.SoftCache%1}>)
|
||||||
|
meth public void replaceAll(java.util.function.BiFunction<? super {com.formdev.flatlaf.util.SoftCache%0},? super {com.formdev.flatlaf.util.SoftCache%1},? extends {com.formdev.flatlaf.util.SoftCache%1}>)
|
||||||
|
meth public {com.formdev.flatlaf.util.SoftCache%1} get(java.lang.Object)
|
||||||
|
meth public {com.formdev.flatlaf.util.SoftCache%1} put({com.formdev.flatlaf.util.SoftCache%0},{com.formdev.flatlaf.util.SoftCache%1})
|
||||||
|
meth public {com.formdev.flatlaf.util.SoftCache%1} remove(java.lang.Object)
|
||||||
|
supr java.lang.Object
|
||||||
|
hfds map,queue
|
||||||
|
hcls CacheReference
|
||||||
|
|
||||||
CLSS public com.formdev.flatlaf.util.StringUtils
|
CLSS public com.formdev.flatlaf.util.StringUtils
|
||||||
cons public init()
|
cons public init()
|
||||||
meth public static boolean isEmpty(java.lang.String)
|
meth public static boolean isEmpty(java.lang.String)
|
||||||
|
meth public static boolean isTrimmedEmpty(java.lang.String)
|
||||||
meth public static java.lang.String removeLeading(java.lang.String,java.lang.String)
|
meth public static java.lang.String removeLeading(java.lang.String,java.lang.String)
|
||||||
meth public static java.lang.String removeTrailing(java.lang.String,java.lang.String)
|
meth public static java.lang.String removeTrailing(java.lang.String,java.lang.String)
|
||||||
|
meth public static java.lang.String substringTrimmed(java.lang.String,int)
|
||||||
|
meth public static java.lang.String substringTrimmed(java.lang.String,int,int)
|
||||||
meth public static java.util.List<java.lang.String> split(java.lang.String,char)
|
meth public static java.util.List<java.lang.String> split(java.lang.String,char)
|
||||||
|
meth public static java.util.List<java.lang.String> split(java.lang.String,char,boolean,boolean)
|
||||||
|
supr java.lang.Object
|
||||||
|
|
||||||
|
CLSS public com.formdev.flatlaf.util.SwingUtils
|
||||||
|
cons public init()
|
||||||
|
meth public static <%0 extends java.awt.Component> {%%0} getComponentByName(java.awt.Container,java.lang.String)
|
||||||
supr java.lang.Object
|
supr java.lang.Object
|
||||||
|
|
||||||
CLSS public com.formdev.flatlaf.util.SystemInfo
|
CLSS public com.formdev.flatlaf.util.SystemInfo
|
||||||
cons public init()
|
cons public init()
|
||||||
|
fld public final static boolean isAARCH64
|
||||||
fld public final static boolean isJava_11_orLater
|
fld public final static boolean isJava_11_orLater
|
||||||
fld public final static boolean isJava_15_orLater
|
fld public final static boolean isJava_15_orLater
|
||||||
|
fld public final static boolean isJava_17_orLater
|
||||||
|
fld public final static boolean isJava_18_orLater
|
||||||
fld public final static boolean isJava_9_orLater
|
fld public final static boolean isJava_9_orLater
|
||||||
fld public final static boolean isJetBrainsJVM
|
fld public final static boolean isJetBrainsJVM
|
||||||
fld public final static boolean isJetBrainsJVM_11_orLater
|
fld public final static boolean isJetBrainsJVM_11_orLater
|
||||||
@@ -615,6 +679,8 @@ fld public final static boolean isWebswing
|
|||||||
fld public final static boolean isWinPE
|
fld public final static boolean isWinPE
|
||||||
fld public final static boolean isWindows
|
fld public final static boolean isWindows
|
||||||
fld public final static boolean isWindows_10_orLater
|
fld public final static boolean isWindows_10_orLater
|
||||||
|
fld public final static boolean isWindows_11_orLater
|
||||||
|
fld public final static boolean isX86
|
||||||
fld public final static boolean isX86_64
|
fld public final static boolean isX86_64
|
||||||
fld public final static long javaVersion
|
fld public final static long javaVersion
|
||||||
fld public final static long osVersion
|
fld public final static long osVersion
|
||||||
@@ -627,6 +693,7 @@ cons public init()
|
|||||||
meth public static boolean isSystemScalingEnabled()
|
meth public static boolean isSystemScalingEnabled()
|
||||||
meth public static double getSystemScaleFactor(java.awt.Graphics2D)
|
meth public static double getSystemScaleFactor(java.awt.Graphics2D)
|
||||||
meth public static double getSystemScaleFactor(java.awt.GraphicsConfiguration)
|
meth public static double getSystemScaleFactor(java.awt.GraphicsConfiguration)
|
||||||
|
meth public static float computeFontScaleFactor(java.awt.Font)
|
||||||
meth public static float getUserScaleFactor()
|
meth public static float getUserScaleFactor()
|
||||||
meth public static float scale(float)
|
meth public static float scale(float)
|
||||||
meth public static float unscale(float)
|
meth public static float unscale(float)
|
||||||
@@ -933,6 +1000,34 @@ CLSS public abstract interface !annotation java.lang.annotation.Target
|
|||||||
intf java.lang.annotation.Annotation
|
intf java.lang.annotation.Annotation
|
||||||
meth public abstract java.lang.annotation.ElementType[] value()
|
meth public abstract java.lang.annotation.ElementType[] value()
|
||||||
|
|
||||||
|
CLSS public abstract interface java.util.Map<%0 extends java.lang.Object, %1 extends java.lang.Object>
|
||||||
|
innr public abstract interface static Entry
|
||||||
|
meth public abstract boolean containsKey(java.lang.Object)
|
||||||
|
meth public abstract boolean containsValue(java.lang.Object)
|
||||||
|
meth public abstract boolean equals(java.lang.Object)
|
||||||
|
meth public abstract boolean isEmpty()
|
||||||
|
meth public abstract int hashCode()
|
||||||
|
meth public abstract int size()
|
||||||
|
meth public abstract java.util.Collection<{java.util.Map%1}> values()
|
||||||
|
meth public abstract java.util.Set<java.util.Map$Entry<{java.util.Map%0},{java.util.Map%1}>> entrySet()
|
||||||
|
meth public abstract java.util.Set<{java.util.Map%0}> keySet()
|
||||||
|
meth public abstract void clear()
|
||||||
|
meth public abstract void putAll(java.util.Map<? extends {java.util.Map%0},? extends {java.util.Map%1}>)
|
||||||
|
meth public abstract {java.util.Map%1} get(java.lang.Object)
|
||||||
|
meth public abstract {java.util.Map%1} put({java.util.Map%0},{java.util.Map%1})
|
||||||
|
meth public abstract {java.util.Map%1} remove(java.lang.Object)
|
||||||
|
meth public boolean remove(java.lang.Object,java.lang.Object)
|
||||||
|
meth public boolean replace({java.util.Map%0},{java.util.Map%1},{java.util.Map%1})
|
||||||
|
meth public void forEach(java.util.function.BiConsumer<? super {java.util.Map%0},? super {java.util.Map%1}>)
|
||||||
|
meth public void replaceAll(java.util.function.BiFunction<? super {java.util.Map%0},? super {java.util.Map%1},? extends {java.util.Map%1}>)
|
||||||
|
meth public {java.util.Map%1} compute({java.util.Map%0},java.util.function.BiFunction<? super {java.util.Map%0},? super {java.util.Map%1},? extends {java.util.Map%1}>)
|
||||||
|
meth public {java.util.Map%1} computeIfAbsent({java.util.Map%0},java.util.function.Function<? super {java.util.Map%0},? extends {java.util.Map%1}>)
|
||||||
|
meth public {java.util.Map%1} computeIfPresent({java.util.Map%0},java.util.function.BiFunction<? super {java.util.Map%0},? super {java.util.Map%1},? extends {java.util.Map%1}>)
|
||||||
|
meth public {java.util.Map%1} getOrDefault(java.lang.Object,{java.util.Map%1})
|
||||||
|
meth public {java.util.Map%1} merge({java.util.Map%0},{java.util.Map%1},java.util.function.BiFunction<? super {java.util.Map%1},? super {java.util.Map%1},? extends {java.util.Map%1}>)
|
||||||
|
meth public {java.util.Map%1} putIfAbsent({java.util.Map%0},{java.util.Map%1})
|
||||||
|
meth public {java.util.Map%1} replace({java.util.Map%0},{java.util.Map%1})
|
||||||
|
|
||||||
CLSS public abstract interface javax.swing.Icon
|
CLSS public abstract interface javax.swing.Icon
|
||||||
meth public abstract int getIconHeight()
|
meth public abstract int getIconHeight()
|
||||||
meth public abstract int getIconWidth()
|
meth public abstract int getIconWidth()
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ public class FlatHelpButtonIcon
|
|||||||
</svg>
|
</svg>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boolean enabled = c.isEnabled();
|
boolean enabled = c == null || c.isEnabled();
|
||||||
boolean focused = FlatUIUtils.isPermanentFocusOwner( c );
|
boolean focused = c != null && FlatUIUtils.isPermanentFocusOwner( c );
|
||||||
|
|
||||||
float xy = 0.5f;
|
float xy = 0.5f;
|
||||||
float wh = iconSize() - 1;
|
float wh = iconSize() - 1;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class FlatMenuArrowIcon
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintIcon( Component c, Graphics2D g ) {
|
protected void paintIcon( Component c, Graphics2D g ) {
|
||||||
if( !c.getComponentOrientation().isLeftToRight() )
|
if( c != null && !c.getComponentOrientation().isLeftToRight() )
|
||||||
g.rotate( Math.toRadians( 180 ), width / 2., height / 2. );
|
g.rotate( Math.toRadians( 180 ), width / 2., height / 2. );
|
||||||
|
|
||||||
g.setColor( getArrowColor( c ) );
|
g.setColor( getArrowColor( c ) );
|
||||||
@@ -82,7 +82,7 @@ public class FlatMenuArrowIcon
|
|||||||
if( c instanceof JMenu && ((JMenu)c).isSelected() && !isUnderlineSelection() )
|
if( c instanceof JMenu && ((JMenu)c).isSelected() && !isUnderlineSelection() )
|
||||||
return selectionForeground;
|
return selectionForeground;
|
||||||
|
|
||||||
return c.isEnabled() ? arrowColor : disabledArrowColor;
|
return c == null || c.isEnabled() ? arrowColor : disabledArrowColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isUnderlineSelection() {
|
protected boolean isUnderlineSelection() {
|
||||||
|
|||||||
@@ -262,6 +262,10 @@ public class FlatButtonUI
|
|||||||
b.repaint();
|
b.repaint();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OUTLINE:
|
||||||
|
b.repaint();
|
||||||
|
break;
|
||||||
|
|
||||||
case STYLE:
|
case STYLE:
|
||||||
case STYLE_CLASS:
|
case STYLE_CLASS:
|
||||||
if( shared && FlatStylingSupport.hasStyleProperty( b ) ) {
|
if( shared && FlatStylingSupport.hasStyleProperty( b ) ) {
|
||||||
@@ -569,6 +573,9 @@ public class FlatButtonUI
|
|||||||
public static Color buttonStateColor( Component c, Color enabledColor, Color disabledColor,
|
public static Color buttonStateColor( Component c, Color enabledColor, Color disabledColor,
|
||||||
Color focusedColor, Color hoverColor, Color pressedColor )
|
Color focusedColor, Color hoverColor, Color pressedColor )
|
||||||
{
|
{
|
||||||
|
if( c == null )
|
||||||
|
return enabledColor;
|
||||||
|
|
||||||
if( !c.isEnabled() )
|
if( !c.isEnabled() )
|
||||||
return disabledColor;
|
return disabledColor;
|
||||||
|
|
||||||
|
|||||||
@@ -354,6 +354,7 @@ public class FlatComboBoxUI
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case COMPONENT_ROUND_RECT:
|
case COMPONENT_ROUND_RECT:
|
||||||
|
case OUTLINE:
|
||||||
comboBox.repaint();
|
comboBox.repaint();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,14 @@ package com.formdev.flatlaf.ui;
|
|||||||
|
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.basic.BasicPanelUI;
|
import javax.swing.plaf.basic.BasicPanelUI;
|
||||||
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
||||||
import com.formdev.flatlaf.util.LoggingFacade;
|
import com.formdev.flatlaf.util.LoggingFacade;
|
||||||
@@ -43,13 +45,12 @@ import com.formdev.flatlaf.util.UIScale;
|
|||||||
*/
|
*/
|
||||||
public class FlatPanelUI
|
public class FlatPanelUI
|
||||||
extends BasicPanelUI
|
extends BasicPanelUI
|
||||||
implements StyleableUI
|
implements StyleableUI, PropertyChangeListener
|
||||||
{
|
{
|
||||||
// only used via styling (not in UI defaults)
|
// only used via styling (not in UI defaults)
|
||||||
/** @since 2 */ @Styleable protected int arc = -1;
|
/** @since 2 */ @Styleable protected int arc = -1;
|
||||||
|
|
||||||
private final boolean shared;
|
private final boolean shared;
|
||||||
private PropertyChangeListener propertyChangeListener;
|
|
||||||
private Map<String, Object> oldStyleValues;
|
private Map<String, Object> oldStyleValues;
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
@@ -67,9 +68,7 @@ public class FlatPanelUI
|
|||||||
public void installUI( JComponent c ) {
|
public void installUI( JComponent c ) {
|
||||||
super.installUI( c );
|
super.installUI( c );
|
||||||
|
|
||||||
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
|
c.addPropertyChangeListener( this );
|
||||||
c, () -> stylePropertyChange( (JPanel) c ), null );
|
|
||||||
c.addPropertyChangeListener( propertyChangeListener );
|
|
||||||
|
|
||||||
installStyle( (JPanel) c );
|
installStyle( (JPanel) c );
|
||||||
}
|
}
|
||||||
@@ -78,13 +77,18 @@ public class FlatPanelUI
|
|||||||
public void uninstallUI( JComponent c ) {
|
public void uninstallUI( JComponent c ) {
|
||||||
super.uninstallUI( c );
|
super.uninstallUI( c );
|
||||||
|
|
||||||
c.removePropertyChangeListener( propertyChangeListener );
|
c.removePropertyChangeListener( this );
|
||||||
propertyChangeListener = null;
|
|
||||||
|
|
||||||
oldStyleValues = null;
|
oldStyleValues = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stylePropertyChange( JPanel c ) {
|
/** @since 2.0.1 */
|
||||||
|
@Override
|
||||||
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
|
switch( e.getPropertyName() ) {
|
||||||
|
case FlatClientProperties.STYLE:
|
||||||
|
case FlatClientProperties.STYLE_CLASS:
|
||||||
|
JPanel c = (JPanel) e.getSource();
|
||||||
if( shared && FlatStylingSupport.hasStyleProperty( c ) ) {
|
if( shared && FlatStylingSupport.hasStyleProperty( c ) ) {
|
||||||
// unshare component UI if necessary
|
// unshare component UI if necessary
|
||||||
// updateUI() invokes installStyle() from installUI()
|
// updateUI() invokes installStyle() from installUI()
|
||||||
@@ -93,6 +97,8 @@ public class FlatPanelUI
|
|||||||
installStyle( c );
|
installStyle( c );
|
||||||
c.revalidate();
|
c.revalidate();
|
||||||
c.repaint();
|
c.repaint();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 2 */
|
/** @since 2 */
|
||||||
|
|||||||
@@ -16,10 +16,12 @@
|
|||||||
|
|
||||||
package com.formdev.flatlaf.ui;
|
package com.formdev.flatlaf.ui;
|
||||||
|
|
||||||
|
import java.awt.AWTEvent;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
import java.awt.GraphicsDevice;
|
import java.awt.GraphicsDevice;
|
||||||
import java.awt.GraphicsEnvironment;
|
import java.awt.GraphicsEnvironment;
|
||||||
@@ -33,6 +35,7 @@ import java.awt.Toolkit;
|
|||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.ComponentEvent;
|
import java.awt.event.ComponentEvent;
|
||||||
import java.awt.event.ComponentListener;
|
import java.awt.event.ComponentListener;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -219,7 +222,7 @@ public class FlatPopupFactory
|
|||||||
* and corrects the y-location so that the tooltip is placed above the mouse location.
|
* and corrects the y-location so that the tooltip is placed above the mouse location.
|
||||||
*/
|
*/
|
||||||
private Point fixToolTipLocation( Component owner, Component contents, int x, int y ) {
|
private Point fixToolTipLocation( Component owner, Component contents, int x, int y ) {
|
||||||
if( !(contents instanceof JToolTip) || !wasInvokedFromToolTipManager() )
|
if( !(contents instanceof JToolTip) || !wasInvokedFromToolTipManager() || hasTipLocation( owner ) )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
PointerInfo pointerInfo = MouseInfo.getPointerInfo();
|
PointerInfo pointerInfo = MouseInfo.getPointerInfo();
|
||||||
@@ -264,6 +267,35 @@ public class FlatPopupFactory
|
|||||||
return StackUtils.wasInvokedFrom( ToolTipManager.class.getName(), "showTipWindow", 8 );
|
return StackUtils.wasInvokedFrom( ToolTipManager.class.getName(), "showTipWindow", 8 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the owner component returns a tooltip location in
|
||||||
|
* JComponent.getToolTipLocation(MouseEvent).
|
||||||
|
*/
|
||||||
|
private boolean hasTipLocation( Component owner ) {
|
||||||
|
if( !(owner instanceof JComponent) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
AWTEvent e = EventQueue.getCurrentEvent();
|
||||||
|
MouseEvent me;
|
||||||
|
if( e instanceof MouseEvent )
|
||||||
|
me = (MouseEvent) e;
|
||||||
|
else {
|
||||||
|
// no mouse event available because a timer is used to show the tooltip
|
||||||
|
// --> create mouse event from current mouse location
|
||||||
|
PointerInfo pointerInfo = MouseInfo.getPointerInfo();
|
||||||
|
if( pointerInfo == null )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Point location = new Point( pointerInfo.getLocation());
|
||||||
|
SwingUtilities.convertPointFromScreen( location, owner );
|
||||||
|
me = new MouseEvent( owner, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(),
|
||||||
|
0, location.x, location.y, 0, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
return me.getSource() == owner &&
|
||||||
|
((JComponent)owner).getToolTipLocation( me ) != null;
|
||||||
|
}
|
||||||
|
|
||||||
//---- class NonFlashingPopup ---------------------------------------------
|
//---- class NonFlashingPopup ---------------------------------------------
|
||||||
|
|
||||||
private class NonFlashingPopup
|
private class NonFlashingPopup
|
||||||
|
|||||||
@@ -291,6 +291,10 @@ public class FlatScrollPaneUI
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FlatClientProperties.OUTLINE:
|
||||||
|
scrollpane.repaint();
|
||||||
|
break;
|
||||||
|
|
||||||
case FlatClientProperties.STYLE:
|
case FlatClientProperties.STYLE:
|
||||||
case FlatClientProperties.STYLE_CLASS:
|
case FlatClientProperties.STYLE_CLASS:
|
||||||
installStyle();
|
installStyle();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -28,6 +29,7 @@ import javax.swing.JSeparator;
|
|||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.basic.BasicSeparatorUI;
|
import javax.swing.plaf.basic.BasicSeparatorUI;
|
||||||
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
||||||
import com.formdev.flatlaf.util.LoggingFacade;
|
import com.formdev.flatlaf.util.LoggingFacade;
|
||||||
@@ -50,7 +52,7 @@ import com.formdev.flatlaf.util.LoggingFacade;
|
|||||||
*/
|
*/
|
||||||
public class FlatSeparatorUI
|
public class FlatSeparatorUI
|
||||||
extends BasicSeparatorUI
|
extends BasicSeparatorUI
|
||||||
implements StyleableUI
|
implements StyleableUI, PropertyChangeListener
|
||||||
{
|
{
|
||||||
@Styleable protected int height;
|
@Styleable protected int height;
|
||||||
@Styleable protected int stripeWidth;
|
@Styleable protected int stripeWidth;
|
||||||
@@ -58,7 +60,6 @@ public class FlatSeparatorUI
|
|||||||
|
|
||||||
private final boolean shared;
|
private final boolean shared;
|
||||||
private boolean defaults_initialized = false;
|
private boolean defaults_initialized = false;
|
||||||
private PropertyChangeListener propertyChangeListener;
|
|
||||||
private Map<String, Object> oldStyleValues;
|
private Map<String, Object> oldStyleValues;
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
@@ -109,20 +110,23 @@ public class FlatSeparatorUI
|
|||||||
protected void installListeners( JSeparator s ) {
|
protected void installListeners( JSeparator s ) {
|
||||||
super.installListeners( s );
|
super.installListeners( s );
|
||||||
|
|
||||||
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
|
s.addPropertyChangeListener( this );
|
||||||
s, () -> stylePropertyChange( s ), null );
|
|
||||||
s.addPropertyChangeListener( propertyChangeListener );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void uninstallListeners( JSeparator s ) {
|
protected void uninstallListeners( JSeparator s ) {
|
||||||
super.uninstallListeners( s );
|
super.uninstallListeners( s );
|
||||||
|
|
||||||
s.removePropertyChangeListener( propertyChangeListener );
|
s.removePropertyChangeListener( this );
|
||||||
propertyChangeListener = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stylePropertyChange( JSeparator s ) {
|
/** @since 2.0.1 */
|
||||||
|
@Override
|
||||||
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
|
switch( e.getPropertyName() ) {
|
||||||
|
case FlatClientProperties.STYLE:
|
||||||
|
case FlatClientProperties.STYLE_CLASS:
|
||||||
|
JSeparator s = (JSeparator) e.getSource();
|
||||||
if( shared && FlatStylingSupport.hasStyleProperty( s ) ) {
|
if( shared && FlatStylingSupport.hasStyleProperty( s ) ) {
|
||||||
// unshare component UI if necessary
|
// unshare component UI if necessary
|
||||||
// updateUI() invokes installStyle() from installUI()
|
// updateUI() invokes installStyle() from installUI()
|
||||||
@@ -131,6 +135,8 @@ public class FlatSeparatorUI
|
|||||||
installStyle( s );
|
installStyle( s );
|
||||||
s.revalidate();
|
s.revalidate();
|
||||||
s.repaint();
|
s.repaint();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 2 */
|
/** @since 2 */
|
||||||
|
|||||||
@@ -538,6 +538,7 @@ public class FlatSpinnerUI
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FlatClientProperties.COMPONENT_ROUND_RECT:
|
case FlatClientProperties.COMPONENT_ROUND_RECT:
|
||||||
|
case FlatClientProperties.OUTLINE:
|
||||||
spinner.repaint();
|
spinner.repaint();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ public class FlatTextFieldUI
|
|||||||
switch( e.getPropertyName() ) {
|
switch( e.getPropertyName() ) {
|
||||||
case PLACEHOLDER_TEXT:
|
case PLACEHOLDER_TEXT:
|
||||||
case COMPONENT_ROUND_RECT:
|
case COMPONENT_ROUND_RECT:
|
||||||
|
case OUTLINE:
|
||||||
case TEXT_FIELD_PADDING:
|
case TEXT_FIELD_PADDING:
|
||||||
c.repaint();
|
c.repaint();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.geom.Rectangle2D;
|
import java.awt.geom.Rectangle2D;
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -31,6 +32,7 @@ import javax.swing.SwingConstants;
|
|||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import javax.swing.plaf.basic.BasicToolBarSeparatorUI;
|
import javax.swing.plaf.basic.BasicToolBarSeparatorUI;
|
||||||
|
import com.formdev.flatlaf.FlatClientProperties;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
||||||
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
import com.formdev.flatlaf.ui.FlatStylingSupport.StyleableUI;
|
||||||
import com.formdev.flatlaf.util.LoggingFacade;
|
import com.formdev.flatlaf.util.LoggingFacade;
|
||||||
@@ -47,7 +49,7 @@ import com.formdev.flatlaf.util.LoggingFacade;
|
|||||||
*/
|
*/
|
||||||
public class FlatToolBarSeparatorUI
|
public class FlatToolBarSeparatorUI
|
||||||
extends BasicToolBarSeparatorUI
|
extends BasicToolBarSeparatorUI
|
||||||
implements StyleableUI
|
implements StyleableUI, PropertyChangeListener
|
||||||
{
|
{
|
||||||
private static final int LINE_WIDTH = 1;
|
private static final int LINE_WIDTH = 1;
|
||||||
|
|
||||||
@@ -56,7 +58,6 @@ public class FlatToolBarSeparatorUI
|
|||||||
|
|
||||||
private final boolean shared;
|
private final boolean shared;
|
||||||
private boolean defaults_initialized = false;
|
private boolean defaults_initialized = false;
|
||||||
private PropertyChangeListener propertyChangeListener;
|
|
||||||
private Map<String, Object> oldStyleValues;
|
private Map<String, Object> oldStyleValues;
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
@@ -105,20 +106,23 @@ public class FlatToolBarSeparatorUI
|
|||||||
protected void installListeners( JSeparator s ) {
|
protected void installListeners( JSeparator s ) {
|
||||||
super.installListeners( s );
|
super.installListeners( s );
|
||||||
|
|
||||||
propertyChangeListener = FlatStylingSupport.createPropertyChangeListener(
|
s.addPropertyChangeListener( this );
|
||||||
s, () -> stylePropertyChange( s ), null );
|
|
||||||
s.addPropertyChangeListener( propertyChangeListener );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void uninstallListeners( JSeparator s ) {
|
protected void uninstallListeners( JSeparator s ) {
|
||||||
super.uninstallListeners( s );
|
super.uninstallListeners( s );
|
||||||
|
|
||||||
s.removePropertyChangeListener( propertyChangeListener );
|
s.removePropertyChangeListener( this );
|
||||||
propertyChangeListener = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stylePropertyChange( JSeparator s ) {
|
/** @since 2.0.1 */
|
||||||
|
@Override
|
||||||
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
|
switch( e.getPropertyName() ) {
|
||||||
|
case FlatClientProperties.STYLE:
|
||||||
|
case FlatClientProperties.STYLE_CLASS:
|
||||||
|
JSeparator s = (JSeparator) e.getSource();
|
||||||
if( shared && FlatStylingSupport.hasStyleProperty( s ) ) {
|
if( shared && FlatStylingSupport.hasStyleProperty( s ) ) {
|
||||||
// unshare component UI if necessary
|
// unshare component UI if necessary
|
||||||
// updateUI() invokes installStyle() from installUI()
|
// updateUI() invokes installStyle() from installUI()
|
||||||
@@ -127,6 +131,8 @@ public class FlatToolBarSeparatorUI
|
|||||||
installStyle( s );
|
installStyle( s );
|
||||||
s.revalidate();
|
s.revalidate();
|
||||||
s.repaint();
|
s.repaint();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 2 */
|
/** @since 2 */
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.awt.FontMetrics;
|
|||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
@@ -49,9 +50,8 @@ import com.formdev.flatlaf.util.StringUtils;
|
|||||||
*/
|
*/
|
||||||
public class FlatToolTipUI
|
public class FlatToolTipUI
|
||||||
extends BasicToolTipUI
|
extends BasicToolTipUI
|
||||||
|
implements PropertyChangeListener
|
||||||
{
|
{
|
||||||
private static PropertyChangeListener sharedPropertyChangedListener;
|
|
||||||
|
|
||||||
public static ComponentUI createUI( JComponent c ) {
|
public static ComponentUI createUI( JComponent c ) {
|
||||||
return FlatUIUtils.createSharedUI( FlatToolTipUI.class, FlatToolTipUI::new );
|
return FlatUIUtils.createSharedUI( FlatToolTipUI.class, FlatToolTipUI::new );
|
||||||
}
|
}
|
||||||
@@ -68,24 +68,24 @@ public class FlatToolTipUI
|
|||||||
protected void installListeners( JComponent c ) {
|
protected void installListeners( JComponent c ) {
|
||||||
super.installListeners( c );
|
super.installListeners( c );
|
||||||
|
|
||||||
if( sharedPropertyChangedListener == null ) {
|
c.addPropertyChangeListener( this );
|
||||||
sharedPropertyChangedListener = e -> {
|
|
||||||
String name = e.getPropertyName();
|
|
||||||
if( name == "tiptext" || name == "font" || name == "foreground" ) {
|
|
||||||
JToolTip toolTip = (JToolTip) e.getSource();
|
|
||||||
FlatLabelUI.updateHTMLRenderer( toolTip, toolTip.getTipText(), false );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
c.addPropertyChangeListener( sharedPropertyChangedListener );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void uninstallListeners( JComponent c ) {
|
protected void uninstallListeners( JComponent c ) {
|
||||||
super.uninstallListeners( c );
|
super.uninstallListeners( c );
|
||||||
|
|
||||||
c.removePropertyChangeListener( sharedPropertyChangedListener );
|
c.removePropertyChangeListener( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since 2.0.1 */
|
||||||
|
@Override
|
||||||
|
public void propertyChange( PropertyChangeEvent e ) {
|
||||||
|
String name = e.getPropertyName();
|
||||||
|
if( name == "tiptext" || name == "font" || name == "foreground" ) {
|
||||||
|
JToolTip toolTip = (JToolTip) e.getSource();
|
||||||
|
FlatLabelUI.updateHTMLRenderer( toolTip, toolTip.getTipText(), false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2022 FormDev Software GmbH
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.formdev.flatlaf.icons;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import javax.swing.Icon;
|
||||||
|
import com.formdev.flatlaf.ui.TestUtils;
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||||
|
|
||||||
|
class TestFlatIconPaintingNullComponent
|
||||||
|
{
|
||||||
|
static Graphics graphics;
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
static void setup() {
|
||||||
|
TestUtils.setup( false );
|
||||||
|
graphics = new BufferedImage( 32, 32, BufferedImage.TYPE_INT_ARGB ).getGraphics();
|
||||||
|
graphics.setColor( Color.white );
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
static void cleanup() {
|
||||||
|
TestUtils.cleanup();
|
||||||
|
graphics = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void flatHelpButtonIcon() {
|
||||||
|
paintWithoutException( new FlatHelpButtonIcon() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void flatMenuArrowIcon() {
|
||||||
|
paintWithoutException( new FlatMenuArrowIcon() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void flatSearchIcon() {
|
||||||
|
paintWithoutException( new FlatSearchIcon() );
|
||||||
|
}
|
||||||
|
|
||||||
|
private void paintWithoutException( Icon icon ) {
|
||||||
|
graphics.clearRect( 0, 0, 32, 32 );
|
||||||
|
assertDoesNotThrow( () -> icon.paintIcon( null, graphics, 0, 0 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -284,6 +284,20 @@ public class FlatSVGIcon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a copy of the given icon.
|
||||||
|
* <p>
|
||||||
|
* If the icon has a color filter, then it is shared with the new icon.
|
||||||
|
*
|
||||||
|
* @since 2.0.1
|
||||||
|
*/
|
||||||
|
public FlatSVGIcon( FlatSVGIcon icon ) {
|
||||||
|
this( icon.name, icon.width, icon.height, icon.scale, icon.disabled, icon.classLoader, icon.uri );
|
||||||
|
colorFilter = icon.colorFilter;
|
||||||
|
diagram = icon.diagram;
|
||||||
|
dark = icon.dark;
|
||||||
|
}
|
||||||
|
|
||||||
protected FlatSVGIcon( String name, int width, int height, float scale, boolean disabled, ClassLoader classLoader, URI uri ) {
|
protected FlatSVGIcon( String name, int width, int height, float scale, boolean disabled, ClassLoader classLoader, URI uri ) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
@@ -466,7 +480,7 @@ public class FlatSVGIcon
|
|||||||
|
|
||||||
if( url == null ) {
|
if( url == null ) {
|
||||||
loadFailed = true;
|
loadFailed = true;
|
||||||
LoggingFacade.INSTANCE.logSevere( "FlatSVGIcon: resource '" + name + "' not found (if using Java modules, check whether icon package is opened in module-info.java)", null );
|
LoggingFacade.INSTANCE.logConfig( "FlatSVGIcon: resource '" + name + "' not found (if using Java modules, check whether icon package is opened in module-info.java)", null );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class FlatWindowsNativeWindowBorder
|
|||||||
private static final int GWLP_WNDPROC = -4;
|
private static final int GWLP_WNDPROC = -4;
|
||||||
|
|
||||||
private static final int
|
private static final int
|
||||||
|
WM_MOVE = 0x0003,
|
||||||
WM_ERASEBKGND = 0x0014,
|
WM_ERASEBKGND = 0x0014,
|
||||||
WM_NCCALCSIZE = 0x0083,
|
WM_NCCALCSIZE = 0x0083,
|
||||||
WM_NCHITTEST = 0x0084,
|
WM_NCHITTEST = 0x0084,
|
||||||
@@ -301,6 +302,10 @@ public class FlatWindowsNativeWindowBorder
|
|||||||
WM_LBUTTONDOWN = 0x0201,
|
WM_LBUTTONDOWN = 0x0201,
|
||||||
WM_LBUTTONUP = 0x0202,
|
WM_LBUTTONUP = 0x0202,
|
||||||
|
|
||||||
|
WM_MOVING = 0x0216,
|
||||||
|
WM_ENTERSIZEMOVE = 0x0231,
|
||||||
|
WM_EXITSIZEMOVE = 0x0232,
|
||||||
|
|
||||||
WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320;
|
WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320;
|
||||||
|
|
||||||
// WM_SIZE wParam
|
// WM_SIZE wParam
|
||||||
@@ -341,6 +346,8 @@ public class FlatWindowsNativeWindowBorder
|
|||||||
private final LONG_PTR defaultWndProc;
|
private final LONG_PTR defaultWndProc;
|
||||||
private int wmSizeWParam = -1;
|
private int wmSizeWParam = -1;
|
||||||
private HBRUSH background;
|
private HBRUSH background;
|
||||||
|
private boolean isMovingOrSizing;
|
||||||
|
private boolean isMoving;
|
||||||
|
|
||||||
// Swing coordinates/values may be scaled on a HiDPI screen
|
// Swing coordinates/values may be scaled on a HiDPI screen
|
||||||
private int titleBarHeight;
|
private int titleBarHeight;
|
||||||
@@ -477,7 +484,27 @@ public class FlatWindowsNativeWindowBorder
|
|||||||
wParam = new WPARAM( wmSizeWParam );
|
wParam = new WPARAM( wmSizeWParam );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_ENTERSIZEMOVE:
|
||||||
|
isMovingOrSizing = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_EXITSIZEMOVE:
|
||||||
|
isMovingOrSizing = isMoving = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_MOVE:
|
||||||
|
case WM_MOVING:
|
||||||
|
if( isMovingOrSizing )
|
||||||
|
isMoving = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
|
// do not erase background while the user is moving the window,
|
||||||
|
// otherwise there may be rendering artifacts on HiDPI screens with Java 9+
|
||||||
|
// when dragging the window partly offscreen and back into the screen bounds
|
||||||
|
if( isMoving )
|
||||||
|
return new LRESULT( 0 );
|
||||||
|
|
||||||
return WmEraseBkgnd( hwnd, uMsg, wParam, lParam );
|
return WmEraseBkgnd( hwnd, uMsg, wParam, lParam );
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ FlatWndProc::FlatWndProc() {
|
|||||||
defaultWndProc = NULL;
|
defaultWndProc = NULL;
|
||||||
wmSizeWParam = -1;
|
wmSizeWParam = -1;
|
||||||
background = NULL;
|
background = NULL;
|
||||||
|
isMovingOrSizing = false;
|
||||||
|
isMoving = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND FlatWndProc::install( JNIEnv *env, jobject obj, jobject window ) {
|
HWND FlatWndProc::install( JNIEnv *env, jobject obj, jobject window ) {
|
||||||
@@ -250,7 +252,27 @@ LRESULT CALLBACK FlatWndProc::WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, L
|
|||||||
wParam = wmSizeWParam;
|
wParam = wmSizeWParam;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_ENTERSIZEMOVE:
|
||||||
|
isMovingOrSizing = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_EXITSIZEMOVE:
|
||||||
|
isMovingOrSizing = isMoving = false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_MOVE:
|
||||||
|
case WM_MOVING:
|
||||||
|
if( isMovingOrSizing )
|
||||||
|
isMoving = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
|
// do not erase background while the user is moving the window,
|
||||||
|
// otherwise there may be rendering artifacts on HiDPI screens with Java 9+
|
||||||
|
// when dragging the window partly offscreen and back into the screen bounds
|
||||||
|
if( isMoving )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return WmEraseBkgnd( hwnd, uMsg, wParam, lParam );
|
return WmEraseBkgnd( hwnd, uMsg, wParam, lParam );
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ private:
|
|||||||
WNDPROC defaultWndProc;
|
WNDPROC defaultWndProc;
|
||||||
int wmSizeWParam;
|
int wmSizeWParam;
|
||||||
HBRUSH background;
|
HBRUSH background;
|
||||||
|
bool isMovingOrSizing;
|
||||||
|
bool isMoving;
|
||||||
|
|
||||||
FlatWndProc();
|
FlatWndProc();
|
||||||
static void initIDs( JNIEnv *env, jobject obj );
|
static void initIDs( JNIEnv *env, jobject obj );
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ public class FlatComponentsTest
|
|||||||
((JComponent)c).putClientProperty( FlatClientProperties.OUTLINE, outline );
|
((JComponent)c).putClientProperty( FlatClientProperties.OUTLINE, outline );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
repaint();
|
|
||||||
textField1.requestFocusInWindow();
|
textField1.requestFocusInWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,15 +2,23 @@ FlatLaf Theme Editor
|
|||||||
====================
|
====================
|
||||||
|
|
||||||
This sub-project contains the FlatLaf Theme Editor that supports editing FlatLaf
|
This sub-project contains the FlatLaf Theme Editor that supports editing FlatLaf
|
||||||
theme properties files.
|
theme properties files. See
|
||||||
|
[Theme Editor documentation](https://www.formdev.com/flatlaf/theme-editor/) for
|
||||||
|
details and downloads.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
Download
|
Download
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
[](https://download.formdev.com/flatlaf/flatlaf-theme-editor-latest.jar)
|
||||||
|
|
||||||
|
Run with `java -jar flatlaf-theme-editor-<version>.jar` (or double-click it).
|
||||||
|
Requires Java 8 or newer.
|
||||||
|
|
||||||
|
|
||||||
### Snapshot
|
### Snapshot
|
||||||
|
|
||||||
[](https://download.formdev.com/flatlaf/snapshots/flatlaf-theme-editor-latest.jar)
|
[](https://download.formdev.com/flatlaf/snapshots/flatlaf-theme-editor-latest.jar)
|
||||||
|
|
||||||
Run with `java -jar flatlaf-theme-editor-<version>.jar` (or double-click it).
|
|
||||||
Requires Java 8 or newer.
|
|
||||||
|
|||||||
BIN
images/theme-editor@1.5x.png
Normal file
BIN
images/theme-editor@1.5x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user