Compare commits

...

59 Commits
0.44 ... 0.45

Author SHA1 Message Date
Karl Tauber
b5deca7f22 release 0.45 2020-12-05 14:32:02 +01:00
Karl Tauber
604ba236c0 Merge pull request #217 into master
MenuBar.underlineSelectionColor
2020-12-05 12:00:50 +01:00
Karl Tauber
14df490b2a MenuBar: support different underline menu selection style UI defaults for MenuBar and MenuItem. (PR #217; issue #216) 2020-12-05 11:56:38 +01:00
Karl Tauber
dd2f73e8ad Merge pull request #214 into master
Slider redesign
2020-12-04 22:43:05 +01:00
Karl Tauber
56bfdc8ef9 Slider: updated CHANGELOG.md 2020-12-04 22:29:32 +01:00
Karl Tauber
91dbf1e144 Sider: text baseline layout in FlatComponentsTest 2020-12-04 21:08:12 +01:00
Karl Tauber
e07ae90d09 TabbedPane: no longer add (internal) tab close button component as child to JTabbedPane (issue #219) 2020-11-29 01:32:38 +01:00
Karl Tauber
5ef0c9aae1 Table: fixed unstable grid line thickness when scaled on HiDPI screens (issue #152) 2020-11-28 23:20:58 +01:00
Karl Tauber
aefed7c481 Table: do not paint last vertical grid line if auto-resize mode is not off (issue #46) 2020-11-28 23:15:37 +01:00
Karl Tauber
0d66d9f9a3 FlatCheckBoxIcon:
- added parameter `Component c` to all paint methods so that subclasses can access component states
- extracted methods to get colors and selected/indeterminate state
2020-11-28 12:29:13 +01:00
Karl Tauber
d0ffc4f979 TabbedPane: support hiding tab area if it contains only one tab 2020-11-28 11:21:46 +01:00
mmatessi
f149d2b7cd MenuBar.underlineSelectionColor 2020-11-27 19:14:28 +01:00
Karl Tauber
21a12b8dd4 added Flat*Laf.installLafInfo() methods to add a Laf to the set of available Lafs
uses `UIManager.installLookAndFeel( new UIManager.LookAndFeelInfo(...) )`
2020-11-23 22:14:42 +01:00
Karl Tauber
6c8b8e8949 Popup: allow forcing to heavy weight popup windows (issue #189) 2020-11-23 18:09:44 +01:00
Karl Tauber
539737d1c5 ScrollBar: fixed NPE in NetBeans GUI builder when using JCalendar component (issue #194) 2020-11-23 17:19:04 +01:00
Karl Tauber
33ff5828da IntelliJ Themes:
- added "Gradianto Nature Green" theme
- updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox" and "One Dark" themes
2020-11-22 17:10:11 +01:00
Karl Tauber
1fb0783808 Slider: fixed slider colors in IntelliJ themes 2020-11-21 18:18:06 +01:00
Karl Tauber
b5e7aa8553 Slider: fixed painting issues:
- needle of directional thumb was not painted while dragging
- artifacts on HiDPI screen while dragging
- cut off focus indicator on HiDPI screen
2020-11-21 18:18:06 +01:00
Karl Tauber
1d3ce76b27 Slider: replaced Slider.thumbWidth with Slider.thumbSize to support non-square sized thumbs (as used in Windows 10) 2020-11-21 18:18:06 +01:00
Karl Tauber
0101171159 UIDefaultsLoader: added fadein(), fadeout(), fade() and spin() color functions (inspired by Less CSS) 2020-11-21 18:18:06 +01:00
Karl Tauber
8b8ed0b9ff Slider:
- compute useful baseline for horizontal orientation so that the track is vertically centered
- no baseline for vertical orientation
2020-11-21 18:18:06 +01:00
Karl Tauber
413b60e630 Slider:
- changed default color to bluish
- made track thinner (2px, was 3px)
- made thumb larger (12px, was 11px)
- added thumb outline focus indicator (4px wide)
- slider component height increased from 11px to 20px
- support painting thumb border
- support different colors for thumb background and colored track
2020-11-21 18:18:06 +01:00
Karl Tauber
10b2a94c70 JIDE: RangeSlider: avoid that middle track is painted over first thumb 2020-11-21 18:18:06 +01:00
Karl Tauber
e337e5bbd8 JIDE: RangeSlider:
- updated with latest changes from FlatSliderUI
- use static FlatSliderUI methods for thumb painting
- hover/pressed feedback on single thumb
- hover/pressed feedback on middle track and both thumbs
- added JSlider components to FlatRangeSliderTest for easier testing/comparing
2020-11-21 18:18:06 +01:00
Karl Tauber
6e55e0a183 Slider:
- hover feedback only when mouse is over thumb
- pressed feedback added
- separate disabled colors for track and thumb
- made private fields protected
2020-11-21 18:18:06 +01:00
Karl Tauber
8ee1d26935 Merge branch into master 2020-11-21 17:53:17 +01:00
Karl Tauber
80bdf69eaf GitHub Actions: build on all branches; produce snapshots only on master branch; disable Travis CI 2020-11-21 17:31:52 +01:00
Karl Tauber
18e838bffd GitHub Actions: exclude javadoc and sources from build artifacts 2020-11-21 15:21:33 +01:00
Karl Tauber
d95b1b0ec4 GitHub Actions: upload build artifacts 2020-11-21 15:08:07 +01:00
Karl Tauber
d16a3c117b GitHub Actions: 3rd attempt to test release job without publishing 2020-11-21 14:45:02 +01:00
Karl Tauber
d04ec982ab GitHub Actions: 2nd attempt to test release job without publishing 2020-11-21 14:42:09 +01:00
Karl Tauber
cce99c803e GitHub Actions: test release job without publishing 2020-11-21 14:32:36 +01:00
Karl Tauber
19ed538573 GitHub Actions: added secrets for snapshot and release jobs 2020-11-21 14:24:56 +01:00
Karl Tauber
a1f78345e6 GitHub Actions: use separate jobs for snapshots and releases to be sure that build succeeded for all Java versions 2020-11-21 14:04:32 +01:00
Karl Tauber
f8c7ccf064 GitHub Actions: run if tags are pushed 2020-11-21 13:38:21 +01:00
Karl Tauber
4d5242cd61 GitHub Actions: fixed typo in snapshot step condition 2020-11-21 12:06:18 +01:00
Karl Tauber
7ad176f98d GitHub Actions: info step added 2020-11-21 12:02:08 +01:00
Karl Tauber
57df7d28b5 GitHub Actions: added steps for snapshots and releases 2020-11-21 11:51:41 +01:00
Karl Tauber
f784ff2c84 GitHub Actions: test also against Java 9 2020-11-21 01:57:37 +01:00
Karl Tauber
a0f6affb68 GitHub Actions: cache gradle wrapper; fixed key for caching gradle cache 2020-11-21 01:37:28 +01:00
Karl Tauber
0c679167fa GitHub Actions: cache gradle dependencies 2020-11-21 00:48:27 +01:00
Karl Tauber
4fe707e519 GitHub Actions: initial commit 2020-11-21 00:19:46 +01:00
Karl Tauber
d83704b7cb FlatPaintingTest: added test case for circular components 2020-11-20 11:57:24 +01:00
Karl Tauber
2177ee45cc FlatUIUtils: replaced quadratic curves with bezier curves in createRoundRectanglePath() to get perfect circle when using large arcs
(currently only used for SwingX)
2020-11-20 11:50:03 +01:00
Karl Tauber
ccd4f99aea Window decorations: removed 1px window border if window is in full-screen mode (issue #212) 2020-11-20 10:12:28 +01:00
Karl Tauber
cd6b55c846 Demo: Alt+UP and Alt+DOWN now switch to previous/next theme 2020-11-20 00:40:10 +01:00
Karl Tauber
d923c8df81 Window decorations: title bar was not hidden if window is in full-screen mode (issue #212) 2020-11-18 23:31:04 +01:00
Karl Tauber
59879f493e FlatTestFrame: fixed exception when using FlatPropertiesLaf and changing scale factor, which re-sets the current Laf 2020-11-18 18:45:13 +01:00
Karl Tauber
06cab0d4b5 updated svgSalamander to version 1.1.2.4 2020-11-18 18:34:12 +01:00
Karl Tauber
a16db38a6f Testing: FlatBaselineTest added 2020-11-18 18:32:08 +01:00
Karl Tauber
de93e19a80 JIDE: RangeSlider: updated UI defaults dumps 2020-11-17 12:13:01 +01:00
Karl Tauber
47bb7d0de7 JIDE: RangeSlider: added to CHANGELOG.md and README.md 2020-11-16 22:26:49 +01:00
Karl Tauber
896e808db4 JIDE: RangeSlider: removed nested panel from FlatRangeSliderTest 2020-11-16 22:19:09 +01:00
Karl Tauber
6fe6d1ffa0 JIDE: RangeSlider: reordered methods and slightly changed formatting to make it easier to compare with FlatRangeSliderUI 2020-11-16 22:04:08 +01:00
Karl Tauber
4c6f7a66e2 Merge pull request #209 into master
Add RangeSlider support
2020-11-16 21:25:50 +01:00
mmatessi
f57dbf94c8 FlatJideOssDefaultsAddon reformat 2020-11-13 09:47:32 +01:00
mmatessi
c0f15d2e6f FlatRangeSliderUI fix change label foreground 2020-11-13 09:42:26 +01:00
mmatessi
cb525fafb6 FlatSliderUI extends BasicSliderUI 2020-11-12 13:02:16 +01:00
mmatessi
5cae3a8141 add RangeSlider support 2020-11-11 16:57:40 +01:00
140 changed files with 3973 additions and 666 deletions

142
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,142 @@
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI
on:
push:
branches:
- '*'
tags:
- '[0-9]*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# test against
# - Java 1.8 (minimum requirement)
# - Java 9 (first version with JPMS)
# - Java LTS versions (11, 17, ...)
# - lastest Java version(s)
java:
- 1.8
- 9
- 11 # LTS
- 14
- 15
steps:
- uses: actions/checkout@v2
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache Gradle wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: matrix.java == '11'
with:
name: FlatLaf-build-artifacts
path: |
flatlaf-core/build/libs
flatlaf-demo/build/libs
flatlaf-extras/build/libs
flatlaf-intellij-themes/build/libs
flatlaf-jide-oss/build/libs
flatlaf-swingx/build/libs
!**/*-javadoc.jar
!**/*-sources.jar
snapshot:
runs-on: ubuntu-latest
needs: build
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
github.repository == 'JFormDesigner/FlatLaf'
steps:
- uses: actions/checkout@v2
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Publish snapshot to oss.jfrog.org
run: ./gradlew artifactoryPublish
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
release:
runs-on: ubuntu-latest
needs: build
if: |
github.event_name == 'push' &&
startsWith( github.ref, 'refs/tags/' ) &&
github.repository == 'JFormDesigner/FlatLaf'
steps:
- uses: actions/checkout@v2
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Release a new stable version to bintray
run: ./gradlew bintrayUpload -Drelease=true
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}

View File

@@ -1,40 +0,0 @@
language: java
sudo: false
jdk:
- openjdk8
- openjdk9
- openjdk11
- openjdk14
- openjdk15
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_install:
- ./gradlew --version
- java -version
stages:
- name: test
- name: snapshot
if: branch = master AND type IN (push) AND tag IS blank
- name: release
if: type IN (push) AND tag IS present
jobs:
include:
# publish snapshot to oss.jfrog.org
- stage: snapshot
jdk: openjdk11
script: ./gradlew artifactoryPublish
# release a new stable version to bintray
- stage: release
jdk: openjdk11
script: ./gradlew bintrayUpload -Drelease=true

View File

@@ -1,6 +1,35 @@
FlatLaf Change Log
==================
## 0.45
#### New features and improvements
- Slider: New design, added hover and pressed feedback and improved customizing.
(PR #214)
- JIDE Common Layer: Support `RangeSlider`. (PR #209)
- IntelliJ Themes:
- Added "Gradianto Nature Green" theme.
- Updated "Arc Dark", "Cyan", "Dark purple", "Gradianto", "Gray", "Gruvbox"
and "One Dark" themes.
- TabbedPane: Support hiding tab area if it contains only one tab. (set client
property `JTabbedPane.hideTabAreaWithOneTab` to `true`)
- MenuBar: Support different underline menu selection style UI defaults for
`MenuBar` and `MenuItem`. (PR #217; issue #216)
#### Fixed bugs
- Table: Do not paint last vertical grid line if auto-resize mode is not off.
(issue #46)
- Table: Fixed unstable grid line thickness when scaled on HiDPI screens. (issue
#152)
- TabbedPane: No longer add (internal) tab close button component as child to
`JTabbedPane`. (issue #219)
- Custom window decorations: Title bar was not hidden if window is in
full-screen mode. (issue #212)
## 0.44
#### New features and improvements

View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/
val releaseVersion = "0.44"
val developmentVersion = "0.45-SNAPSHOT"
val releaseVersion = "0.45"
val developmentVersion = "0.46-SNAPSHOT"
version = if( java.lang.Boolean.getBoolean( "release" ) ) releaseVersion else developmentVersion
@@ -48,7 +48,7 @@ extra["bintray.dryRun"] = false
// if true, uploaded artifacts are visible to all
// if false, only visible to owner when logged into bintray
extra["bintray.publish"] = true
extra["bintray.publish"] = false
allprojects {

View File

@@ -181,6 +181,15 @@ public interface FlatClientProperties
*/
String POPUP_DROP_SHADOW_PAINTED = "Popup.dropShadowPainted";
/**
* Specifies whether a heavy weight window should be used if the component is shown in a popup
* or if the component is the owner of another component that is shown in a popup.
* <p>
* <strong>Component</strong> {@link javax.swing.JComponent}<br>
* <strong>Value type</strong> {@link java.lang.Boolean}
*/
String POPUP_FORCE_HEAVY_WEIGHT = "Popup.forceHeavyWeight";
//---- JProgressBar -------------------------------------------------------
/**
@@ -210,7 +219,7 @@ public interface FlatClientProperties
*/
String MENU_BAR_EMBEDDED = "JRootPane.menuBarEmbedded";
//---- JScrollBar ---------------------------------------------------------
//---- JScrollBar / JScrollPane -------------------------------------------
/**
* Specifies whether the decrease/increase arrow buttons of a scrollbar are shown.
@@ -254,6 +263,14 @@ public interface FlatClientProperties
*/
String TABBED_PANE_HAS_FULL_BORDER = "JTabbedPane.hasFullBorder";
/**
* Specifies whether the tab area should be hidded if it contains only one tab.
* <p>
* <strong>Component</strong> {@link javax.swing.JTabbedPane}<br>
* <strong>Value type</strong> {@link java.lang.Boolean}
*/
String TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB = "JTabbedPane.hideTabAreaWithOneTab";
/**
* Specifies the minimum width of a tab.
* <p>

View File

@@ -18,21 +18,28 @@ package com.formdev.flatlaf;
/**
* A Flat LaF that has a dark color scheme and looks like Darcula LaF.
*
* The UI defaults are loaded from FlatDarculaLaf.properties, FlatDarkLaf.properties and FlatLaf.properties
* <p>
* The UI defaults are loaded from {@code FlatDarculaLaf.properties},
* {@code FlatDarkLaf.properties} and {@code FlatLaf.properties}.
*
* @author Karl Tauber
*/
public class FlatDarculaLaf
extends FlatDarkLaf
{
public static boolean install( ) {
public static final String NAME = "FlatLaf Darcula";
public static boolean install() {
return install( new FlatDarculaLaf() );
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDarculaLaf.class );
}
@Override
public String getName() {
return "FlatLaf Darcula";
return NAME;
}
@Override

View File

@@ -16,23 +16,41 @@
package com.formdev.flatlaf;
import javax.swing.UIManager;
/**
* A Flat LaF that has a dark color scheme.
*
* The UI defaults are loaded from FlatDarkLaf.properties and FlatLaf.properties
* <p>
* The UI defaults are loaded from {@code FlatDarkLaf.properties} and {@code FlatLaf.properties}.
*
* @author Karl Tauber
*/
public class FlatDarkLaf
extends FlatLaf
{
public static boolean install( ) {
public static final String NAME = "FlatLaf Dark";
/**
* Sets the application look and feel to this LaF
* using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}.
*/
public static boolean install() {
return install( new FlatDarkLaf() );
}
/**
* Adds this look and feel to the set of available look and feels.
* <p>
* Useful if your application uses {@link UIManager#getInstalledLookAndFeels()}
* to query available LaFs and display them to the user in a combobox.
*/
public static void installLafInfo() {
installLafInfo( NAME, FlatDarkLaf.class );
}
@Override
public String getName() {
return "FlatLaf Dark";
return NAME;
}
@Override

View File

@@ -18,21 +18,28 @@ package com.formdev.flatlaf;
/**
* A Flat LaF that has a light color scheme and looks like IntelliJ LaF.
*
* The UI defaults are loaded from FlatIntelliJLaf.properties, FlatLightLaf.properties and FlatLaf.properties
* <p>
* The UI defaults are loaded from {@code FlatIntelliJLaf.properties},
* {@code FlatLightLaf.properties} and {@code FlatLaf.properties}.
*
* @author Karl Tauber
*/
public class FlatIntelliJLaf
extends FlatLightLaf
{
public static boolean install( ) {
public static final String NAME = "FlatLaf IntelliJ";
public static boolean install() {
return install( new FlatIntelliJLaf() );
}
public static void installLafInfo() {
installLafInfo( NAME, FlatIntelliJLaf.class );
}
@Override
public String getName() {
return "FlatLaf IntelliJ";
return NAME;
}
@Override

View File

@@ -50,9 +50,9 @@ import javax.swing.LookAndFeel;
import javax.swing.PopupFactory;
import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIDefaults.ActiveValue;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIDefaults.ActiveValue;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
import javax.swing.plaf.UIResource;
@@ -94,6 +94,10 @@ public abstract class FlatLaf
private Boolean oldFrameWindowDecorated;
private Boolean oldDialogWindowDecorated;
/**
* Sets the application look and feel to the given LaF
* using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}.
*/
public static boolean install( LookAndFeel newLookAndFeel ) {
try {
UIManager.setLookAndFeel( newLookAndFeel );
@@ -104,6 +108,16 @@ public abstract class FlatLaf
}
}
/**
* Adds the given look and feel to the set of available look and feels.
* <p>
* Useful if your application uses {@link UIManager#getInstalledLookAndFeels()}
* to query available LaFs and display them to the user in a combobox.
*/
public static void installLafInfo( String lafName, Class<? extends LookAndFeel> lafClass ) {
UIManager.installLookAndFeel( new UIManager.LookAndFeelInfo( lafName, lafClass.getName() ) );
}
/**
* Returns the look and feel identifier.
* <p>

View File

@@ -16,23 +16,41 @@
package com.formdev.flatlaf;
import javax.swing.UIManager;
/**
* A Flat LaF that has a light color scheme.
*
* The UI defaults are loaded from FlatLightLaf.properties and FlatLaf.properties
* <p>
* The UI defaults are loaded from {@code FlatLightLaf.properties} and {@code FlatLaf.properties}.
*
* @author Karl Tauber
*/
public class FlatLightLaf
extends FlatLaf
{
public static boolean install( ) {
public static final String NAME = "FlatLaf Light";
/**
* Sets the application look and feel to this LaF
* using {@link UIManager#setLookAndFeel(javax.swing.LookAndFeel)}.
*/
public static boolean install() {
return install( new FlatLightLaf() );
}
/**
* Adds this look and feel to the set of available look and feels.
* <p>
* Useful if your application uses {@link UIManager#getInstalledLookAndFeels()}
* to query available LaFs and display them to the user in a combobox.
*/
public static void installLafInfo() {
installLafInfo( NAME, FlatLightLaf.class );
}
@Override
public String getName() {
return "FlatLaf Light";
return NAME;
}
@Override

View File

@@ -88,6 +88,10 @@ public class FlatPropertiesLaf
return dark;
}
public Properties getProperties() {
return properties;
}
@Override
protected ArrayList<Class<?>> getLafClassesForDefaultsLoading() {
ArrayList<Class<?>> lafClasses = new ArrayList<>();

View File

@@ -475,7 +475,9 @@ public class IntelliJTheme
}
}
/** Rename UI default keys (key --> value). */
private static Map<String, String> uiKeyMapping = new HashMap<>();
/** Copy UI default keys (value --> key). */
private static Map<String, String> uiKeyCopying = new HashMap<>();
private static Map<String, String> uiKeyInverseMapping = new HashMap<>();
private static Map<String, String> checkboxKeyMapping = new HashMap<>();
@@ -529,6 +531,9 @@ public class IntelliJTheme
// Slider
uiKeyMapping.put( "Slider.trackWidth", "" ); // ignore (used in Material Theme UI Lite)
uiKeyCopying.put( "Slider.trackValueColor", "ProgressBar.foreground" );
uiKeyCopying.put( "Slider.thumbColor", "ProgressBar.foreground" );
uiKeyCopying.put( "Slider.trackColor", "ProgressBar.background" );
// TitlePane
uiKeyCopying.put( "TitlePane.inactiveBackground", "TitlePane.background" );

View File

@@ -586,13 +586,17 @@ class UIDefaultsLoader
case "darken": return parseColorHSLIncreaseDecrease( 2, false, params, resolver, reportError );
case "saturate": return parseColorHSLIncreaseDecrease( 1, true, params, resolver, reportError );
case "desaturate": return parseColorHSLIncreaseDecrease( 1, false, params, resolver, reportError );
case "fadein": return parseColorHSLIncreaseDecrease( 3, true, params, resolver, reportError );
case "fadeout": return parseColorHSLIncreaseDecrease( 3, false, params, resolver, reportError );
case "fade": return parseColorFade( params, resolver, reportError );
case "spin": return parseColorSpin( params, resolver, reportError );
}
throw new IllegalArgumentException( "unknown color function '" + value + "'" );
}
/**
* Syntax: rgb(red,green,blue) or rgba(red,green,blue,alpha) or rgba(color,alpha)
* Syntax: rgb(red,green,blue) or rgba(red,green,blue,alpha)
* - red: an integer 0-255 or a percentage 0-100%
* - green: an integer 0-255 or a percentage 0-100%
* - blue: an integer 0-255 or a percentage 0-100%
@@ -603,6 +607,8 @@ class UIDefaultsLoader
{
if( hasAlpha && params.size() == 2 ) {
// syntax rgba(color,alpha), which allows adding alpha to any color
// NOTE: this syntax is deprecated
// use fade(color,alpha) instead
String colorStr = params.get( 0 );
int alpha = parseInteger( params.get( 1 ), 0, 255, true );
@@ -639,7 +645,8 @@ class UIDefaultsLoader
/**
* Syntax: lighten(color,amount[,options]) or darken(color,amount[,options]) or
* saturate(color,amount[,options]) or desaturate(color,amount[,options])
* saturate(color,amount[,options]) or desaturate(color,amount[,options]) or
* fadein(color,amount[,options]) or fadeout(color,amount[,options])
* - color: a color (e.g. #f00) or a color function
* - amount: percentage 0-100%
* - options: [relative] [autoInverse] [noAutoInverse] [lazy] [derived]
@@ -679,6 +686,59 @@ class UIDefaultsLoader
};
}
// parse base color, apply function and create derived color
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
}
/**
* Syntax: fade(color,amount[,options])
* - color: a color (e.g. #f00) or a color function
* - amount: percentage 0-100%
* - options: [derived]
*/
private static Object parseColorFade( List<String> params, Function<String, String> resolver, boolean reportError ) {
String colorStr = params.get( 0 );
int amount = parsePercentage( params.get( 1 ) );
boolean derived = false;
if( params.size() > 2 ) {
String options = params.get( 2 );
derived = options.contains( "derived" );
}
// create function
ColorFunction function = new ColorFunctions.Fade( amount );
// parse base color, apply function and create derived color
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
}
/**
* Syntax: spin(color,angle[,options])
* - color: a color (e.g. #f00) or a color function
* - angle: number of degrees to rotate
* - options: [derived]
*/
private static Object parseColorSpin( List<String> params, Function<String, String> resolver, boolean reportError ) {
String colorStr = params.get( 0 );
int amount = parseInteger( params.get( 1 ), true );
boolean derived = false;
if( params.size() > 2 ) {
String options = params.get( 2 );
derived = options.contains( "derived" );
}
// create function
ColorFunction function = new ColorFunctions.HSLIncreaseDecrease( 0, true, amount, false, false );
// parse base color, apply function and create derived color
return parseFunctionBaseColor( colorStr, function, derived, resolver, reportError );
}
private static Object parseFunctionBaseColor( String colorStr, ColorFunction function,
boolean derived, Function<String, String> resolver, boolean reportError )
{
// parse base color
String resolvedColorStr = resolver.apply( colorStr );
ColorUIResource baseColor = (ColorUIResource) parseColorOrFunction( resolvedColorStr, resolver, reportError );

View File

@@ -129,78 +129,101 @@ public class FlatCheckBoxIcon
}
@Override
protected void paintIcon( Component c, Graphics2D g2 ) {
boolean indeterminate = c instanceof JComponent && clientPropertyEquals( (JComponent) c, SELECTED_STATE, SELECTED_STATE_INDETERMINATE );
boolean selected = indeterminate || (c instanceof AbstractButton && ((AbstractButton)c).isSelected());
protected void paintIcon( Component c, Graphics2D g ) {
boolean indeterminate = isIndeterminate( c );
boolean selected = indeterminate || isSelected( c );
boolean isFocused = FlatUIUtils.isPermanentFocusOwner( c );
// paint focused border
if( isFocused && focusWidth > 0 && FlatButtonUI.isFocusPainted( c ) ) {
g2.setColor( focusColor );
paintFocusBorder( g2 );
g.setColor( getFocusColor( c ) );
paintFocusBorder( c, g );
}
// paint border
g2.setColor( FlatButtonUI.buttonStateColor( c,
selected ? selectedBorderColor : borderColor,
disabledBorderColor,
selected && selectedFocusedBorderColor != null ? selectedFocusedBorderColor : focusedBorderColor,
hoverBorderColor,
null ) );
paintBorder( g2 );
g.setColor( getBorderColor( c, selected ) );
paintBorder( c, g );
// paint background
g2.setColor( FlatUIUtils.deriveColor( FlatButtonUI.buttonStateColor( c,
selected ? selectedBackground : background,
disabledBackground,
(selected && selectedFocusedBackground != null) ? selectedFocusedBackground : focusedBackground,
(selected && selectedHoverBackground != null) ? selectedHoverBackground : hoverBackground,
(selected && selectedPressedBackground != null) ? selectedPressedBackground : pressedBackground ),
background ) );
paintBackground( g2 );
g.setColor( FlatUIUtils.deriveColor( getBackground( c, selected ), background ) );
paintBackground( c, g );
// paint checkmark
if( selected || indeterminate ) {
g2.setColor( c.isEnabled()
? ((selected && isFocused && selectedFocusedCheckmarkColor != null)
? selectedFocusedCheckmarkColor
: checkmarkColor)
: disabledCheckmarkColor );
g.setColor( getCheckmarkColor( c, selected, isFocused ) );
if( indeterminate )
paintIndeterminate( g2 );
paintIndeterminate( c, g );
else
paintCheckmark( g2 );
paintCheckmark( c, g );
}
}
protected void paintFocusBorder( Graphics2D g2 ) {
protected void paintFocusBorder( Component c, Graphics2D g ) {
// the outline focus border is painted outside of the icon
int wh = ICON_SIZE - 1 + (focusWidth * 2);
int arcwh = arc + (focusWidth * 2);
g2.fillRoundRect( -focusWidth + 1, -focusWidth, wh, wh, arcwh, arcwh );
g.fillRoundRect( -focusWidth + 1, -focusWidth, wh, wh, arcwh, arcwh );
}
protected void paintBorder( Graphics2D g2 ) {
protected void paintBorder( Component c, Graphics2D g ) {
int arcwh = arc;
g2.fillRoundRect( 1, 0, 14, 14, arcwh, arcwh );
g.fillRoundRect( 1, 0, 14, 14, arcwh, arcwh );
}
protected void paintBackground( Graphics2D g2 ) {
protected void paintBackground( Component c, Graphics2D g ) {
int arcwh = arc - 1;
g2.fillRoundRect( 2, 1, 12, 12, arcwh, arcwh );
g.fillRoundRect( 2, 1, 12, 12, arcwh, arcwh );
}
protected void paintCheckmark( Graphics2D g2 ) {
protected void paintCheckmark( Component c, Graphics2D g ) {
Path2D.Float path = new Path2D.Float();
path.moveTo( 4.5f, 7.5f );
path.lineTo( 6.6f, 10f );
path.lineTo( 11.25f, 3.5f );
g2.setStroke( new BasicStroke( 1.9f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ) );
g2.draw( path );
g.setStroke( new BasicStroke( 1.9f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND ) );
g.draw( path );
}
protected void paintIndeterminate( Graphics2D g2 ) {
g2.fill( new RoundRectangle2D.Float( 3.75f, 5.75f, 8.5f, 2.5f, 2f, 2f ) );
protected void paintIndeterminate( Component c, Graphics2D g ) {
g.fill( new RoundRectangle2D.Float( 3.75f, 5.75f, 8.5f, 2.5f, 2f, 2f ) );
}
protected boolean isIndeterminate( Component c ) {
return c instanceof JComponent && clientPropertyEquals( (JComponent) c, SELECTED_STATE, SELECTED_STATE_INDETERMINATE );
}
protected boolean isSelected( Component c ) {
return c instanceof AbstractButton && ((AbstractButton)c).isSelected();
}
protected Color getFocusColor( Component c ) {
return focusColor;
}
protected Color getBorderColor( Component c, boolean selected ) {
return FlatButtonUI.buttonStateColor( c,
selected ? selectedBorderColor : borderColor,
disabledBorderColor,
selected && selectedFocusedBorderColor != null ? selectedFocusedBorderColor : focusedBorderColor,
hoverBorderColor,
null );
}
protected Color getBackground( Component c, boolean selected ) {
return FlatButtonUI.buttonStateColor( c,
selected ? selectedBackground : background,
disabledBackground,
(selected && selectedFocusedBackground != null) ? selectedFocusedBackground : focusedBackground,
(selected && selectedHoverBackground != null) ? selectedHoverBackground : hoverBackground,
(selected && selectedPressedBackground != null) ? selectedPressedBackground : pressedBackground );
}
protected Color getCheckmarkColor( Component c, boolean selected, boolean isFocused ) {
return c.isEnabled()
? ((selected && isFocused && selectedFocusedCheckmarkColor != null)
? selectedFocusedCheckmarkColor
: checkmarkColor)
: disabledCheckmarkColor;
}
}

View File

@@ -16,6 +16,7 @@
package com.formdev.flatlaf.icons;
import java.awt.Component;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
@@ -36,25 +37,25 @@ public class FlatRadioButtonIcon
protected final int centerDiameter = getUIInt( "RadioButton.icon.centerDiameter", 8, style );
@Override
protected void paintFocusBorder( Graphics2D g2 ) {
protected void paintFocusBorder( Component c, Graphics2D g ) {
// the outline focus border is painted outside of the icon
int wh = ICON_SIZE + (focusWidth * 2);
g2.fillOval( -focusWidth, -focusWidth, wh, wh );
g.fillOval( -focusWidth, -focusWidth, wh, wh );
}
@Override
protected void paintBorder( Graphics2D g2 ) {
g2.fillOval( 0, 0, 15, 15 );
protected void paintBorder( Component c, Graphics2D g ) {
g.fillOval( 0, 0, 15, 15 );
}
@Override
protected void paintBackground( Graphics2D g2 ) {
g2.fillOval( 1, 1, 13, 13 );
protected void paintBackground( Component c, Graphics2D g ) {
g.fillOval( 1, 1, 13, 13 );
}
@Override
protected void paintCheckmark( Graphics2D g2 ) {
protected void paintCheckmark( Component c, Graphics2D g ) {
float xy = (ICON_SIZE - centerDiameter) / 2f;
g2.fill( new Ellipse2D.Float( xy, xy, centerDiameter, centerDiameter ) );
g.fill( new Ellipse2D.Float( xy, xy, centerDiameter, centerDiameter ) );
}
}

View File

@@ -39,6 +39,7 @@ import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.util.DerivedColor;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.SystemInfo;
@@ -55,7 +56,7 @@ import com.formdev.flatlaf.util.SystemInfo;
* @uiDefault MenuItem.underlineSelectionBackground Color
* @uiDefault MenuItem.underlineSelectionCheckBackground Color
* @uiDefault MenuItem.underlineSelectionColor Color
* @uiDefault MenuItem.underlineSelectionHeight Color
* @uiDefault MenuItem.underlineSelectionHeight int
*
* @author Karl Tauber
*/
@@ -246,8 +247,11 @@ public class FlatMenuItemRenderer
g.setColor( Color.orange ); g.drawRect( arrowRect.x, arrowRect.y, arrowRect.width - 1, arrowRect.height - 1 );
debug*/
paintBackground( g, selectionBackground );
paintIcon( g, iconRect, getIconForPainting() );
boolean underlineSelection = isUnderlineSelection();
paintBackground( g, underlineSelection ? underlineSelectionBackground : selectionBackground );
if( underlineSelection && isArmedOrSelected( menuItem ) )
paintUnderlineSelection( g, underlineSelectionColor, underlineSelectionHeight );
paintIcon( g, iconRect, getIconForPainting(), underlineSelection ? underlineSelectionCheckBackground : checkBackground );
paintText( g, textRect, menuItem.getText(), selectionForeground, disabledForeground );
paintAccelerator( g, accelRect, getAcceleratorText(), acceleratorForeground, acceleratorSelectionForeground, disabledForeground );
if( !isTopLevelMenu( menuItem ) )
@@ -257,36 +261,36 @@ debug*/
protected void paintBackground( Graphics g, Color selectionBackground ) {
boolean armedOrSelected = isArmedOrSelected( menuItem );
if( menuItem.isOpaque() || armedOrSelected ) {
int width = menuItem.getWidth();
int height = menuItem.getHeight();
// paint background
g.setColor( armedOrSelected
? (isUnderlineSelection()
? deriveBackground( underlineSelectionBackground )
: selectionBackground)
? deriveBackground( selectionBackground )
: menuItem.getBackground() );
g.fillRect( 0, 0, width, height );
g.fillRect( 0, 0, menuItem.getWidth(), menuItem.getHeight() );
}
}
// paint underline
if( armedOrSelected && isUnderlineSelection() ) {
int underlineHeight = scale( underlineSelectionHeight );
g.setColor( underlineSelectionColor );
if( isTopLevelMenu( menuItem ) ) {
// paint underline at bottom
g.fillRect( 0, height - underlineHeight, width, underlineHeight );
} else if( menuItem.getComponentOrientation().isLeftToRight() ) {
// paint underline at left side
g.fillRect( 0, 0, underlineHeight, height );
} else {
// paint underline at right side
g.fillRect( width - underlineHeight, 0, underlineHeight, height );
}
}
protected void paintUnderlineSelection( Graphics g, Color underlineSelectionColor, int underlineSelectionHeight ) {
int width = menuItem.getWidth();
int height = menuItem.getHeight();
int underlineHeight = scale( underlineSelectionHeight );
g.setColor( underlineSelectionColor );
if( isTopLevelMenu( menuItem ) ) {
// paint underline at bottom
g.fillRect( 0, height - underlineHeight, width, underlineHeight );
} else if( menuItem.getComponentOrientation().isLeftToRight() ) {
// paint underline at left side
g.fillRect( 0, 0, underlineHeight, height );
} else {
// paint underline at right side
g.fillRect( width - underlineHeight, 0, underlineHeight, height );
}
}
protected Color deriveBackground( Color background ) {
if( !(background instanceof DerivedColor) )
return background;
Color baseColor = menuItem.isOpaque()
? menuItem.getBackground()
: FlatUIUtils.getParentBackground( menuItem );
@@ -294,12 +298,12 @@ debug*/
return FlatUIUtils.deriveColor( background, baseColor );
}
protected void paintIcon( Graphics g, Rectangle iconRect, Icon icon ) {
protected void paintIcon( Graphics g, Rectangle iconRect, Icon icon, Color checkBackground ) {
// if checkbox/radiobutton menu item is selected and also has a custom icon,
// then use filled icon background to indicate selection (instead of using checkIcon)
if( menuItem.isSelected() && checkIcon != null && icon != checkIcon ) {
Rectangle r = FlatUIUtils.addInsets( iconRect, scale( checkMargins ) );
g.setColor( deriveBackground( isUnderlineSelection() ? underlineSelectionCheckBackground : checkBackground ) );
g.setColor( deriveBackground( checkBackground ) );
g.fillRect( r.x, r.y, r.width, r.height );
}

View File

@@ -62,6 +62,12 @@ import javax.swing.plaf.basic.BasicMenuUI;
* @uiDefault MenuItem.iconTextGap int
* @uiDefault MenuBar.hoverBackground Color
*
* <!-- FlatMenuRenderer -->
*
* @uiDefault MenuBar.underlineSelectionBackground Color
* @uiDefault MenuBar.underlineSelectionColor Color
* @uiDefault MenuBar.underlineSelectionHeight int
*
* @author Karl Tauber
*/
public class FlatMenuUI
@@ -147,6 +153,10 @@ public class FlatMenuUI
protected class FlatMenuRenderer
extends FlatMenuItemRenderer
{
protected final Color menuBarUnderlineSelectionBackground = FlatUIUtils.getUIColor( "MenuBar.underlineSelectionBackground", underlineSelectionBackground );
protected final Color menuBarUnderlineSelectionColor = FlatUIUtils.getUIColor( "MenuBar.underlineSelectionColor", underlineSelectionColor );
protected final int menuBarUnderlineSelectionHeight = FlatUIUtils.getUIInt( "MenuBar.underlineSelectionHeight", underlineSelectionHeight );
protected FlatMenuRenderer( JMenuItem menuItem, Icon checkIcon, Icon arrowIcon,
Font acceleratorFont, String acceleratorDelimiter )
{
@@ -155,6 +165,9 @@ public class FlatMenuUI
@Override
protected void paintBackground( Graphics g, Color selectionBackground ) {
if( isUnderlineSelection() && ((JMenu)menuItem).isTopLevelMenu() )
selectionBackground = menuBarUnderlineSelectionBackground;
ButtonModel model = menuItem.getModel();
if( model.isRollover() && !model.isArmed() && !model.isSelected() &&
model.isEnabled() && ((JMenu)menuItem).isTopLevelMenu() )
@@ -164,5 +177,15 @@ public class FlatMenuUI
} else
super.paintBackground( g, selectionBackground );
}
@Override
protected void paintUnderlineSelection( Graphics g, Color underlineSelectionColor, int underlineSelectionHeight ) {
if( ((JMenu)menuItem).isTopLevelMenu() ) {
underlineSelectionColor = menuBarUnderlineSelectionColor;
underlineSelectionHeight = menuBarUnderlineSelectionHeight;
}
super.paintUnderlineSelection( g, underlineSelectionColor, underlineSelectionHeight );
}
}
}

View File

@@ -68,19 +68,17 @@ public class FlatPopupFactory
y = pt.y;
}
if( !isDropShadowPainted( owner, contents ) )
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, false ), contents );
boolean forceHeavyWeight = isOptionEnabled( owner, contents, FlatClientProperties.POPUP_FORCE_HEAVY_WEIGHT, "Popup.forceHeavyWeight" );
if( !isOptionEnabled( owner, contents, FlatClientProperties.POPUP_DROP_SHADOW_PAINTED, "Popup.dropShadowPainted" ) )
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), contents );
// macOS and Linux adds drop shadow to heavy weight popups
if( SystemInfo.isMacOS || SystemInfo.isLinux ) {
Popup popup = getPopupForScreenOfOwner( owner, contents, x, y, true );
if( popup == null )
popup = getPopupForScreenOfOwner( owner, contents, x, y, false );
return new NonFlashingPopup( popup, contents );
}
if( SystemInfo.isMacOS || SystemInfo.isLinux )
return new NonFlashingPopup( getPopupForScreenOfOwner( owner, contents, x, y, true ), contents );
// create drop shadow popup
return new DropShadowPopup( getPopupForScreenOfOwner( owner, contents, x, y, false ), owner, contents );
return new DropShadowPopup( getPopupForScreenOfOwner( owner, contents, x, y, forceHeavyWeight ), owner, contents );
}
/**
@@ -155,24 +153,20 @@ public class FlatPopupFactory
popup.show();
}
private boolean isDropShadowPainted( Component owner, Component contents ) {
Boolean b = isDropShadowPainted( owner );
if( b != null )
return b;
private boolean isOptionEnabled( Component owner, Component contents, String clientKey, String uiKey ) {
if( owner instanceof JComponent ) {
Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) owner, clientKey, null );
if( b != null )
return b;
}
b = isDropShadowPainted( contents );
if( b != null )
return b;
if( contents instanceof JComponent ) {
Boolean b = FlatClientProperties.clientPropertyBooleanStrict( (JComponent) contents, clientKey, null );
if( b != null )
return b;
}
return UIManager.getBoolean( "Popup.dropShadowPainted" );
}
private Boolean isDropShadowPainted( Component c ) {
if( !(c instanceof JComponent) )
return null;
Object value = ((JComponent)c).getClientProperty( FlatClientProperties.POPUP_DROP_SHADOW_PAINTED );
return (value instanceof Boolean ) ? (Boolean) value : null;
return UIManager.getBoolean( uiKey );
}
/**

View File

@@ -285,6 +285,7 @@ public class FlatRootPaneUI
@Override
public void layoutContainer( Container parent ) {
JRootPane rootPane = (JRootPane) parent;
boolean isFullScreen = FlatUIUtils.isFullScreen( rootPane );
Insets insets = rootPane.getInsets();
int x = insets.left;
@@ -298,7 +299,7 @@ public class FlatRootPaneUI
rootPane.getGlassPane().setBounds( x, y, width, height );
int nextY = 0;
if( titlePane != null ) {
if( !isFullScreen && titlePane != null ) {
Dimension prefSize = titlePane.getPreferredSize();
titlePane.setBounds( 0, 0, width, prefSize.height );
nextY += prefSize.height;
@@ -306,7 +307,7 @@ public class FlatRootPaneUI
JMenuBar menuBar = rootPane.getJMenuBar();
if( menuBar != null && menuBar.isVisible() ) {
if( titlePane != null && titlePane.isMenuBarEmbedded() ) {
if( !isFullScreen && titlePane != null && titlePane.isMenuBarEmbedded() ) {
titlePane.validate();
menuBar.setBounds( titlePane.getMenuBarBounds() );
} else {
@@ -356,7 +357,7 @@ public class FlatRootPaneUI
@Override
public Insets getBorderInsets( Component c, Insets insets ) {
if( isWindowMaximized( c ) ) {
if( isWindowMaximized( c ) || FlatUIUtils.isFullScreen( c ) ) {
// hide border if window is maximized
insets.top = insets.left = insets.bottom = insets.right = 0;
return insets;
@@ -366,7 +367,7 @@ public class FlatRootPaneUI
@Override
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
if( isWindowMaximized( c ) )
if( isWindowMaximized( c ) || FlatUIUtils.isFullScreen( c ) )
return;
Container parent = c.getParent();

View File

@@ -142,6 +142,12 @@ public class FlatScrollBarUI
buttonDisabledArrowColor = UIManager.getColor( "ScrollBar.buttonDisabledArrowColor" );
hoverButtonBackground = UIManager.getColor( "ScrollBar.hoverButtonBackground" );
pressedButtonBackground = UIManager.getColor( "ScrollBar.pressedButtonBackground" );
// fallback (e.g. when used in NetBeans GUI builder)
if( trackInsets == null )
trackInsets = new Insets( 0, 0, 0, 0 );
if( thumbInsets == null )
thumbInsets = new Insets( 0, 0, 0, 0 );
}
@Override

View File

@@ -18,17 +18,23 @@ package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.MouseListener;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.event.MouseEvent;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Path2D;
import java.awt.geom.RoundRectangle2D;
import javax.swing.JComponent;
import javax.swing.JSlider;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSliderUI;
import com.formdev.flatlaf.util.HiDPIUtils;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -49,29 +55,44 @@ import com.formdev.flatlaf.util.UIScale;
* <!-- FlatSliderUI -->
*
* @uiDefault Slider.trackWidth int
* @uiDefault Slider.thumbWidth int
* @uiDefault Slider.thumbSize Dimension
* @uiDefault Slider.focusWidth int
* @uiDefault Slider.trackValueColor Color optional; defaults to Slider.thumbColor
* @uiDefault Slider.trackColor Color
* @uiDefault Slider.thumbColor Color
* @uiDefault Slider.thumbBorderColor Color optional; if null, no border is painted
* @uiDefault Slider.focusedColor Color optional; defaults to Component.focusColor
* @uiDefault Slider.hoverColor Color optional; defaults to Slider.focusedColor
* @uiDefault Slider.disabledForeground Color used for track and thumb is disabled
* @uiDefault Slider.focusedThumbBorderColor Color optional; defaults to Component.focusedBorderColor
* @uiDefault Slider.hoverThumbColor Color optional
* @uiDefault Slider.pressedThumbColor Color optional
* @uiDefault Slider.disabledTrackColor Color
* @uiDefault Slider.disabledThumbColor Color
* @uiDefault Slider.disabledThumbBorderColor Color optional; defaults to Component.disabledBorderColor
*
* @author Karl Tauber
*/
public class FlatSliderUI
extends BasicSliderUI
{
private int trackWidth;
private int thumbWidth;
protected int trackWidth;
protected Dimension thumbSize;
protected int focusWidth;
private Color trackColor;
private Color thumbColor;
private Color focusColor;
private Color hoverColor;
private Color disabledForeground;
protected Color trackValueColor;
protected Color trackColor;
protected Color thumbColor;
protected Color thumbBorderColor;
protected Color focusBaseColor;
protected Color focusedColor;
protected Color focusedThumbBorderColor;
protected Color hoverThumbColor;
protected Color pressedThumbColor;
protected Color disabledTrackColor;
protected Color disabledThumbColor;
protected Color disabledThumbBorderColor;
private MouseListener hoverListener;
private boolean hover;
protected boolean thumbHover;
protected boolean thumbPressed;
public static ComponentUI createUI( JComponent c ) {
return new FlatSliderUI();
@@ -81,24 +102,6 @@ public class FlatSliderUI
super( null );
}
@Override
protected void installListeners( JSlider slider ) {
super.installListeners( slider );
hoverListener = new FlatUIUtils.HoverListener( slider, h -> {
hover = h;
} );
slider.addMouseListener( hoverListener );
}
@Override
protected void uninstallListeners( JSlider slider ) {
super.uninstallListeners( slider );
slider.removeMouseListener( hoverListener );
hoverListener = null;
}
@Override
protected void installDefaults( JSlider slider ) {
super.installDefaults( slider );
@@ -106,24 +109,65 @@ public class FlatSliderUI
LookAndFeel.installProperty( slider, "opaque", false );
trackWidth = UIManager.getInt( "Slider.trackWidth" );
thumbWidth = UIManager.getInt( "Slider.thumbWidth" );
thumbSize = UIManager.getDimension( "Slider.thumbSize" );
if( thumbSize == null ) {
// fallback for compatibility with old versions
int thumbWidth = UIManager.getInt( "Slider.thumbWidth" );
thumbSize = new Dimension( thumbWidth, thumbWidth );
}
focusWidth = FlatUIUtils.getUIInt( "Slider.focusWidth", 4 );
trackValueColor = FlatUIUtils.getUIColor( "Slider.trackValueColor", "Slider.thumbColor" );
trackColor = UIManager.getColor( "Slider.trackColor" );
thumbColor = UIManager.getColor( "Slider.thumbColor" );
focusColor = FlatUIUtils.getUIColor( "Slider.focusedColor", "Component.focusColor" );
hoverColor = FlatUIUtils.getUIColor( "Slider.hoverColor", focusColor );
disabledForeground = UIManager.getColor( "Slider.disabledForeground" );
thumbBorderColor = UIManager.getColor( "Slider.thumbBorderColor" );
focusBaseColor = UIManager.getColor( "Component.focusColor" );
focusedColor = FlatUIUtils.getUIColor( "Slider.focusedColor", focusBaseColor );
focusedThumbBorderColor = FlatUIUtils.getUIColor( "Slider.focusedThumbBorderColor", "Component.focusedBorderColor" );
hoverThumbColor = UIManager.getColor( "Slider.hoverThumbColor" );
pressedThumbColor = UIManager.getColor( "Slider.pressedThumbColor" );
disabledTrackColor = UIManager.getColor( "Slider.disabledTrackColor" );
disabledThumbColor = UIManager.getColor( "Slider.disabledThumbColor" );
disabledThumbBorderColor = FlatUIUtils.getUIColor( "Slider.disabledThumbBorderColor", "Component.disabledBorderColor" );
}
@Override
protected void uninstallDefaults( JSlider slider ) {
super.uninstallDefaults( slider );
trackValueColor = null;
trackColor = null;
thumbColor = null;
focusColor = null;
hoverColor = null;
disabledForeground = null;
thumbBorderColor = null;
focusBaseColor = null;
focusedColor = null;
focusedThumbBorderColor = null;
hoverThumbColor = null;
pressedThumbColor = null;
disabledTrackColor = null;
disabledThumbColor = null;
disabledThumbBorderColor = null;
}
@Override
protected TrackListener createTrackListener( JSlider slider ) {
return new FlatTrackListener();
}
@Override
public int getBaseline( JComponent c, int width, int height ) {
if( c == null )
throw new NullPointerException();
if( width < 0 || height < 0 )
throw new IllegalArgumentException();
// no baseline for vertical orientation
if( slider.getOrientation() == JSlider.VERTICAL )
return -1;
// compute a baseline so that the track is vertically centered
FontMetrics fm = slider.getFontMetrics( slider.getFont() );
return trackRect.y + Math.round( (trackRect.height - fm.getHeight()) / 2f ) + fm.getAscent() - 1;
}
@Override
@@ -153,13 +197,35 @@ public class FlatSliderUI
@Override
protected Dimension getThumbSize() {
return new Dimension( UIScale.scale( thumbWidth ), UIScale.scale( thumbWidth ) );
return calcThumbSize( slider, thumbSize, focusWidth );
}
public static Dimension calcThumbSize( JSlider slider, Dimension thumbSize, int focusWidth ) {
int fw = UIScale.scale( focusWidth );
int w = UIScale.scale( thumbSize.width ) + fw + fw;
int h = UIScale.scale( thumbSize.height ) + fw + fw;
return (slider.getOrientation() == JSlider.HORIZONTAL)
? new Dimension( w, h )
: new Dimension( h, w );
}
@Override
public void paint( Graphics g, JComponent c ) {
FlatUIUtils.setRenderingHints( (Graphics2D) g );
/*debug
g.setColor( Color.gray );
g.drawRect( 0, 0, c.getWidth() - 1, c.getHeight() - 1 );
g.setColor( Color.orange );
g.drawRect( focusRect.x, focusRect.y, focusRect.width - 1, focusRect.height - 1 );
g.setColor( Color.magenta );
g.drawRect( contentRect.x, contentRect.y, contentRect.width - 1, contentRect.height - 1 );
g.setColor( Color.blue );
g.drawRect( trackRect.x, trackRect.y, trackRect.width - 1, trackRect.height - 1 );
g.setColor( Color.red );
g.drawRect( thumbRect.x, thumbRect.y, thumbRect.width - 1, thumbRect.height - 1 );
debug*/
super.paint( g, c );
}
@@ -201,50 +267,248 @@ public class FlatSliderUI
}
if( coloredTrack != null ) {
g.setColor( FlatUIUtils.deriveColor( FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor), thumbColor ) );
g.setColor( trackValueColor );
((Graphics2D)g).fill( coloredTrack );
}
g.setColor( enabled ? trackColor : disabledForeground );
g.setColor( enabled ? trackColor : disabledTrackColor );
((Graphics2D)g).fill( track );
}
@Override
public void paintThumb( Graphics g ) {
g.setColor( FlatUIUtils.deriveColor( slider.isEnabled()
? (FlatUIUtils.isPermanentFocusOwner( slider ) ? focusColor : (hover ? hoverColor : thumbColor))
: disabledForeground,
thumbColor ) );
Color color = stateColor( slider, thumbHover, thumbPressed,
thumbColor, disabledThumbColor, null, hoverThumbColor, pressedThumbColor );
color = FlatUIUtils.deriveColor( color, thumbColor );
if( isRoundThumb() )
g.fillOval( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height );
else {
double w = thumbRect.width;
double h = thumbRect.height;
double wh = w / 2;
Color borderColor = (thumbBorderColor != null)
? stateColor( slider, false, false, thumbBorderColor, disabledThumbBorderColor, focusedThumbBorderColor, null, null )
: null;
Path2D thumb = FlatUIUtils.createPath( 0,0, w,0, w,(h - wh), wh,h, 0,(h - wh) );
Color focusedColor = FlatUIUtils.deriveColor( this.focusedColor, focusBaseColor );
paintThumb( g, slider, thumbRect, isRoundThumb(), color, borderColor, focusedColor, focusWidth );
}
public static void paintThumb( Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb,
Color thumbColor, Color thumbBorderColor, Color focusedColor, int focusWidth )
{
double systemScaleFactor = UIScale.getSystemScaleFactor( (Graphics2D) g );
if( systemScaleFactor != 1 && systemScaleFactor != 2 ) {
// paint at scale 1x to avoid clipping on right and bottom edges at 125%, 150% or 175%
HiDPIUtils.paintAtScale1x( (Graphics2D) g, thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height,
(g2d, x2, y2, width2, height2, scaleFactor) -> {
paintThumbImpl( g, slider, x2, y2, width2, height2,
roundThumb, thumbColor, thumbBorderColor, focusedColor,
(float) (focusWidth * scaleFactor) );
} );
return;
}
paintThumbImpl( g, slider, thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height,
roundThumb, thumbColor, thumbBorderColor, focusedColor, focusWidth );
}
private static void paintThumbImpl( Graphics g, JSlider slider, int x, int y, int width, int height,
boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float focusWidth )
{
int fw = Math.round( UIScale.scale( focusWidth ) );
int tx = x + fw;
int ty = y + fw;
int tw = width - fw - fw;
int th = height - fw - fw;
boolean focused = FlatUIUtils.isPermanentFocusOwner( slider );
if( roundThumb ) {
// paint thumb focus border
if( focused ) {
g.setColor( focusedColor );
((Graphics2D)g).fill( createRoundThumbShape( x, y, width, height ) );
}
if( thumbBorderColor != null ) {
// paint thumb border
g.setColor( thumbBorderColor );
((Graphics2D)g).fill( createRoundThumbShape( tx, ty, tw, th ) );
// paint thumb background
float lw = UIScale.scale( 1f );
g.setColor( thumbColor );
((Graphics2D)g).fill( createRoundThumbShape( tx + lw, ty + lw,
tw - lw - lw, th - lw - lw ) );
} else {
// paint thumb background
g.setColor( thumbColor );
((Graphics2D)g).fill( createRoundThumbShape( tx, ty, tw, th ) );
}
} else {
Graphics2D g2 = (Graphics2D) g.create();
try {
g2.translate( thumbRect.x, thumbRect.y );
g2.translate( x, y );
if( slider.getOrientation() == JSlider.VERTICAL ) {
if( slider.getComponentOrientation().isLeftToRight() ) {
g2.translate( 0, thumbRect.height );
g2.translate( 0, height );
g2.rotate( Math.toRadians( 270 ) );
} else {
g2.translate( thumbRect.width, 0 );
g2.translate( width, 0 );
g2.rotate( Math.toRadians( 90 ) );
}
// rotate thumb width/height
int temp = tw;
tw = th;
th = temp;
}
// paint thumb focus border
if( focused ) {
g2.setColor( focusedColor );
g2.fill( createDirectionalThumbShape( 0, 0,
tw + fw + fw, th + fw + fw + (fw * 0.4142f), fw ) );
}
if( thumbBorderColor != null ) {
// paint thumb border
g2.setColor( thumbBorderColor );
g2.fill( createDirectionalThumbShape( fw, fw, tw, th, 0 ) );
// paint thumb background
float lw = UIScale.scale( 1f );
g2.setColor( thumbColor );
g2.fill( createDirectionalThumbShape( fw + lw, fw + lw,
tw - lw - lw, th - lw - lw - (lw * 0.4142f), 0 ) );
} else {
// paint thumb background
g2.setColor( thumbColor );
g2.fill( createDirectionalThumbShape( fw, fw, tw, th, 0 ) );
}
g2.fill( thumb );
} finally {
g2.dispose();
}
}
}
private boolean isRoundThumb() {
public static Shape createRoundThumbShape( float x, float y, float w, float h ) {
if( w == h )
return new Ellipse2D.Float( x, y, w, h );
else {
float arc = Math.min( w, h );
return new RoundRectangle2D.Float( x, y, w, h, arc, arc );
}
}
public static Shape createDirectionalThumbShape( float x, float y, float w, float h, float arc ) {
float wh = w / 2;
Path2D path = new Path2D.Float();
path.moveTo( x + wh, y + h );
path.lineTo( x, y + (h - wh) );
path.lineTo( x, y + arc );
path.quadTo( x, y, x + arc, y );
path.lineTo( x + (w - arc), y );
path.quadTo( x + w, y, x + w, y + arc );
path.lineTo( x + w, y + (h - wh) );
path.closePath();
return path;
}
public static Color stateColor( JSlider slider, boolean hover, boolean pressed,
Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor )
{
if( disabledColor != null && !slider.isEnabled() )
return disabledColor;
if( pressedColor != null && pressed )
return pressedColor;
if( hoverColor != null && hover )
return hoverColor;
if( focusedColor != null && FlatUIUtils.isPermanentFocusOwner( slider ) )
return focusedColor;
return enabledColor;
}
protected boolean isRoundThumb() {
return !slider.getPaintTicks() && !slider.getPaintLabels();
}
@Override
public void setThumbLocation( int x, int y ) {
if( !isRoundThumb() ) {
// the needle of the directional thumb is painted outside of thumbRect
// --> must increase repaint rectangle
// set new thumb location and compute union of old and new thumb bounds
Rectangle r = new Rectangle( thumbRect );
thumbRect.setLocation( x, y );
SwingUtilities.computeUnion( thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height, r );
// increase union rectangle for repaint
int extra = (int) Math.ceil( UIScale.scale( focusWidth ) * 0.4142f );
if( slider.getOrientation() == JSlider.HORIZONTAL )
r.height += extra;
else {
r.width += extra;
if( !slider.getComponentOrientation().isLeftToRight() )
r.x -= extra;
}
slider.repaint( r );
} else
super.setThumbLocation( x, y );
}
//---- class FlatTrackListener --------------------------------------------
protected class FlatTrackListener
extends TrackListener
{
@Override
public void mouseEntered( MouseEvent e ) {
setThumbHover( isOverThumb( e ) );
super.mouseEntered( e );
}
@Override
public void mouseExited( MouseEvent e ) {
setThumbHover( false );
super.mouseExited( e );
}
@Override
public void mouseMoved( MouseEvent e ) {
setThumbHover( isOverThumb( e ) );
super.mouseMoved( e );
}
@Override
public void mousePressed( MouseEvent e ) {
setThumbPressed( isOverThumb( e ) );
super.mousePressed( e );
}
@Override
public void mouseReleased( MouseEvent e ) {
setThumbPressed( false );
super.mouseReleased( e );
}
protected void setThumbHover( boolean hover ) {
if( hover != thumbHover ) {
thumbHover = hover;
slider.repaint( thumbRect );
}
}
protected void setThumbPressed( boolean pressed ) {
if( pressed != thumbPressed ) {
thumbPressed = pressed;
slider.repaint( thumbRect );
}
}
protected boolean isOverThumb( MouseEvent e ) {
return e != null && slider.isEnabled() && thumbRect.contains( e.getX(), e.getY() );
}
}
}

View File

@@ -362,11 +362,6 @@ public class FlatTabbedPaneUI
protected void installComponents() {
super.installComponents();
// create tab close button
tabCloseButton = new TabCloseButton();
tabCloseButton.setVisible( false );
tabPane.add( tabCloseButton );
// find scrollable tab viewport
tabViewport = null;
if( isScrollTabLayout() ) {
@@ -393,11 +388,7 @@ public class FlatTabbedPaneUI
super.uninstallComponents();
if( tabCloseButton != null ) {
tabPane.remove( tabCloseButton );
tabCloseButton = null;
}
tabCloseButton = null;
tabViewport = null;
}
@@ -693,6 +684,26 @@ public class FlatTabbedPaneUI
return Math.max( tabHeight, scale( clientPropertyInt( tabPane, TABBED_PANE_TAB_HEIGHT, this.tabHeight ) ) );
}
@Override
protected int calculateMaxTabWidth( int tabPlacement ) {
return hideTabArea() ? 0 : super.calculateMaxTabWidth( tabPlacement );
}
@Override
protected int calculateMaxTabHeight( int tabPlacement ) {
return hideTabArea() ? 0 : super.calculateMaxTabHeight( tabPlacement );
}
@Override
protected int calculateTabAreaWidth( int tabPlacement, int vertRunCount, int maxTabWidth ) {
return hideTabArea() ? 0 : super.calculateTabAreaWidth( tabPlacement, vertRunCount, maxTabWidth );
}
@Override
protected int calculateTabAreaHeight( int tabPlacement, int horizRunCount, int maxTabHeight ) {
return hideTabArea() ? 0 : super.calculateTabAreaHeight( tabPlacement, horizRunCount, maxTabHeight );
}
@Override
protected Insets getTabInsets( int tabPlacement, int tabIndex ) {
Object value = getTabClientProperty( tabIndex, TABBED_PANE_TAB_INSETS );
@@ -752,7 +763,7 @@ public class FlatTabbedPaneUI
*/
@Override
protected Insets getContentBorderInsets( int tabPlacement ) {
if( contentSeparatorHeight == 0 || !clientPropertyBoolean( tabPane, TABBED_PANE_SHOW_CONTENT_SEPARATOR, true ) )
if( hideTabArea() || contentSeparatorHeight == 0 || !clientPropertyBoolean( tabPane, TABBED_PANE_SHOW_CONTENT_SEPARATOR, true ) )
return new Insets( 0, 0, 0, 0 );
boolean hasFullBorder = clientPropertyBoolean( tabPane, TABBED_PANE_HAS_FULL_BORDER, this.hasFullBorder );
@@ -787,6 +798,9 @@ public class FlatTabbedPaneUI
@Override
public void paint( Graphics g, JComponent c ) {
if( hideTabArea() )
return;
ensureCurrentLayout();
int tabPlacement = tabPane.getTabPlacement();
@@ -911,6 +925,12 @@ public class FlatTabbedPaneUI
}
protected void paintTabCloseButton( Graphics g, int tabIndex, int x, int y, int w, int h ) {
// create tab close button
if( tabCloseButton == null ) {
tabCloseButton = new TabCloseButton();
tabCloseButton.setVisible( false );
}
// update state of tab close button
boolean rollover = (tabIndex == getRolloverTab());
ButtonModel bm = tabCloseButton.getModel();
@@ -1226,6 +1246,13 @@ public class FlatTabbedPaneUI
return UIManager.getBoolean( "ScrollPane.smoothScrolling" );
}
protected boolean hideTabArea() {
return tabPane.getTabCount() == 1 &&
leadingComponent == null &&
trailingComponent == null &&
clientPropertyBoolean( tabPane, TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB, false );
}
protected int getTabsPopupPolicy() {
Object value = tabPane.getClientProperty( TABBED_PANE_TABS_POPUP_POLICY );
@@ -2193,6 +2220,7 @@ public class FlatTabbedPaneUI
case TABBED_PANE_SHOW_TAB_SEPARATORS:
case TABBED_PANE_SHOW_CONTENT_SEPARATOR:
case TABBED_PANE_HAS_FULL_BORDER:
case TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB:
case TABBED_PANE_MINIMUM_TAB_WIDTH:
case TABBED_PANE_MAXIMUM_TAB_WIDTH:
case TABBED_PANE_TAB_HEIGHT:

View File

@@ -19,15 +19,20 @@ package com.formdev.flatlaf.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.geom.Rectangle2D;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableUI;
import javax.swing.table.TableCellRenderer;
import com.formdev.flatlaf.util.Graphics2DProxy;
import com.formdev.flatlaf.util.UIScale;
/**
@@ -203,4 +208,77 @@ public class FlatTableUI
table.setSelectionForeground( selectionInactiveForeground );
}
}
@Override
public void paint( Graphics g, JComponent c ) {
boolean horizontalLines = table.getShowHorizontalLines();
boolean verticalLines = table.getShowVerticalLines();
if( horizontalLines || verticalLines ) {
// fix grid painting issues in BasicTableUI
// - do not paint last vertical grid line if auto-resize mode is not off
// - in right-to-left component orientation, do not paint last vertical grid line
// in any auto-resize mode; can not paint on left side of table because
// cells are painted over left line
// - fix unstable grid line thickness when scaled at 125%, 150%, 175%, 225%, ...
// which paints either 1px or 2px lines depending on location
boolean hideLastVerticalLine =
table.getAutoResizeMode() != JTable.AUTO_RESIZE_OFF ||
!table.getComponentOrientation().isLeftToRight();
int tableWidth = table.getWidth();
double systemScaleFactor = UIScale.getSystemScaleFactor( (Graphics2D) g );
double lineThickness = (1. / systemScaleFactor) * (int) systemScaleFactor;
// Java 8 uses drawLine() to paint grid lines
// Java 9+ uses fillRect() to paint grid lines
g = new Graphics2DProxy( (Graphics2D) g ) {
@Override
public void drawLine( int x1, int y1, int x2, int y2 ) {
// do not paint last vertical line
if( hideLastVerticalLine && verticalLines &&
x1 == x2 && y1 == 0 && x1 == tableWidth - 1 &&
wasInvokedFromPaintGrid() )
return;
super.drawLine( x1, y1, x2, y2 );
}
@Override
public void fillRect( int x, int y, int width, int height ) {
// do not paint last vertical line
if( hideLastVerticalLine && verticalLines &&
width == 1 && y == 0 && x == tableWidth - 1 &&
wasInvokedFromPaintGrid() )
return;
// reduce line thickness to avoid unstable painted line thickness
if( lineThickness != 1 ) {
if( horizontalLines && height == 1 && wasInvokedFromPaintGrid() ) {
super.fill( new Rectangle2D.Double( x, y, width, lineThickness ) );
return;
}
if( verticalLines && width == 1 && y == 0 && wasInvokedFromPaintGrid() ) {
super.fill( new Rectangle2D.Double( x, y, lineThickness, height ) );
return;
}
}
super.fillRect( x, y, width, height );
}
private boolean wasInvokedFromPaintGrid() {
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
for( int i = 0; i < 10 || i < stackTrace.length; i++ ) {
if( "javax.swing.plaf.basic.BasicTableUI".equals( stackTrace[i].getClassName() ) &&
"paintGrid".equals( stackTrace[i].getMethodName() ) )
return true;
}
return false;
}
};
}
super.paint( g, c );
}
}

View File

@@ -23,11 +23,14 @@ import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Window;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseAdapter;
@@ -181,6 +184,16 @@ public class FlatUIUtils
keyboardFocusManager.getActiveWindow() == SwingUtilities.windowForComponent( c );
}
/**
* Returns whether the given component is in a window that is in full-screen mode.
*/
public static boolean isFullScreen( Component c ) {
GraphicsConfiguration gc = c.getGraphicsConfiguration();
GraphicsDevice gd = (gc != null) ? gc.getDevice() : null;
Window fullScreenWindow = (gd != null) ? gd.getFullScreenWindow() : null;
return (fullScreenWindow != null && fullScreenWindow == SwingUtilities.windowForComponent( c ));
}
public static Boolean isRoundRect( Component c ) {
return (c instanceof JComponent)
? FlatClientProperties.clientPropertyBooleanStrict(
@@ -506,15 +519,31 @@ public class FlatUIUtils
float x2 = x + width;
float y2 = y + height;
// same constant as in java.awt.geom.EllipseIterator.CtrlVal used to paint circles
double c = 0.5522847498307933;
double ci = 1. - c;
double ciTopLeft = arcTopLeft * ci;
double ciTopRight = arcTopRight * ci;
double ciBottomLeft = arcBottomLeft * ci;
double ciBottomRight = arcBottomRight * ci;
Path2D rect = new Path2D.Float();
rect.moveTo( x2 - arcTopRight, y );
rect.quadTo( x2, y, x2, y + arcTopRight );
rect.lineTo( x2, y2 - arcBottomRight );
rect.quadTo( x2, y2, x2 - arcBottomRight, y2 );
rect.lineTo( x + arcBottomLeft, y2 );
rect.quadTo( x, y2, x, y2 - arcBottomLeft );
rect.lineTo( x, y + arcTopLeft );
rect.quadTo( x, y, x + arcTopLeft, y );
rect.moveTo( x2 - arcTopRight, y );
rect.curveTo( x2 - ciTopRight, y,
x2, y + ciTopRight,
x2, y + arcTopRight );
rect.lineTo( x2, y2 - arcBottomRight );
rect.curveTo( x2, y2 - ciBottomRight,
x2 - ciBottomRight, y2,
x2 - arcBottomRight, y2 );
rect.lineTo( x + arcBottomLeft, y2 );
rect.curveTo( x + ciBottomLeft, y2,
x, y2 - ciBottomLeft,
x, y2 - arcBottomLeft );
rect.lineTo( x, y + arcTopLeft );
rect.curveTo( x, y + ciTopLeft,
x + ciTopLeft, y,
x + arcTopLeft, y );
rect.closePath();
return rect;

View File

@@ -256,6 +256,8 @@ public abstract class FlatWindowResizer
@Override
protected boolean isWindowResizable() {
if( FlatUIUtils.isFullScreen( resizeComp ) )
return false;
if( window instanceof Frame )
return ((Frame)window).isResizable() && (((Frame)window).getExtendedState() & Frame.MAXIMIZED_BOTH) == 0;
if( window instanceof Dialog )
@@ -429,9 +431,9 @@ public abstract class FlatWindowResizer
protected void paintComponent( Graphics g ) {
super.paintChildren( g );
// this is necessary because Dialog.setResizable() does not fire events
if( isDialog() )
updateVisibility();
// for dialogs: necessary because Dialog.setResizable() does not fire events
// for frames: necessary because GraphicsDevice.setFullScreenWindow() does not fire events
updateVisibility();
/*debug
int width = getWidth();

View File

@@ -28,11 +28,12 @@ public class ColorFunctions
public static Color applyFunctions( Color color, ColorFunction... functions ) {
float[] hsl = HSLColor.fromRGB( color );
float alpha = color.getAlpha() / 255f;
float[] hsla = { hsl[0], hsl[1], hsl[2], alpha * 100 };
for( ColorFunction function : functions )
function.apply( hsl );
function.apply( hsla );
return HSLColor.toRGB( hsl, alpha );
return HSLColor.toRGB( hsla[0], hsla[1], hsla[2], hsla[3] / 100 );
}
public static float clamp( float value ) {
@@ -46,13 +47,13 @@ public class ColorFunctions
//---- interface ColorFunction --------------------------------------------
public interface ColorFunction {
void apply( float[] hsl );
void apply( float[] hsla );
}
//---- class HSLIncreaseDecrease ------------------------------------------
/**
* Increase or decrease hue, saturation or luminance of a color in the HSL color space
* Increase or decrease hue, saturation, luminance or alpha of a color in the HSL color space
* by an absolute or relative amount.
*/
public static class HSLIncreaseDecrease
@@ -75,18 +76,45 @@ public class ColorFunctions
}
@Override
public void apply( float[] hsl ) {
public void apply( float[] hsla ) {
float amount2 = increase ? amount : -amount;
amount2 = autoInverse && shouldInverse( hsl ) ? -amount2 : amount2;
hsl[hslIndex] = clamp( relative
? (hsl[hslIndex] * ((100 + amount2) / 100))
: (hsl[hslIndex] + amount2) );
if( hslIndex == 0 ) {
// hue is range 0-360
hsla[0] = (hsla[0] + amount2) % 360;
return;
}
amount2 = autoInverse && shouldInverse( hsla ) ? -amount2 : amount2;
hsla[hslIndex] = clamp( relative
? (hsla[hslIndex] * ((100 + amount2) / 100))
: (hsla[hslIndex] + amount2) );
}
protected boolean shouldInverse( float[] hsl ) {
protected boolean shouldInverse( float[] hsla ) {
return increase
? hsl[hslIndex] >= 50
: hsl[hslIndex] < 50;
? hsla[hslIndex] >= 50
: hsla[hslIndex] < 50;
}
}
//---- class HSLIncreaseDecrease ------------------------------------------
/**
* Set the alpha of a color.
*/
public static class Fade
implements ColorFunction
{
public final float amount;
public Fade( float amount ) {
this.amount = amount;
}
@Override
public void apply( float[] hsla ) {
hsla[3] = clamp( amount );
}
}
}

View File

@@ -237,11 +237,15 @@ Separator.foreground=#515151
#---- Slider ----
Slider.trackValueColor=#4A88C7
Slider.trackColor=#646464
Slider.thumbColor=#A6A6A6
Slider.thumbColor=$Slider.trackValueColor
Slider.tickColor=#888
Slider.hoverColor=darken($Slider.thumbColor,15%,derived)
Slider.disabledForeground=#4c5052
Slider.focusedColor=fade($Component.focusColor,70%,derived)
Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived)
Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived)
Slider.disabledTrackColor=#4c5052
Slider.disabledThumbColor=$Slider.disabledTrackColor
#---- SplitPane ----

View File

@@ -506,8 +506,9 @@ Separator.stripeIndent=1
#---- Slider ----
Slider.focusInsets=0,0,0,0
Slider.trackWidth=3
Slider.thumbWidth=11
Slider.trackWidth=2
Slider.thumbSize=12,12
Slider.focusWidth=4
#---- Spinner ----
@@ -681,7 +682,7 @@ TitlePane.foreground=@foreground
TitlePane.inactiveForeground=@disabledText
TitlePane.closeHoverBackground=#e81123
TitlePane.closePressedBackground=rgba($TitlePane.closeHoverBackground,60%)
TitlePane.closePressedBackground=fade($TitlePane.closeHoverBackground,60%)
TitlePane.closeHoverForeground=#fff
TitlePane.closePressedForeground=#fff

View File

@@ -249,11 +249,15 @@ Separator.foreground=#d1d1d1
#---- Slider ----
Slider.trackValueColor=#1E82E6
Slider.trackColor=#c4c4c4
Slider.thumbColor=#6e6e6e
Slider.thumbColor=$Slider.trackValueColor
Slider.tickColor=#888
Slider.hoverColor=lighten($Slider.thumbColor,15%,derived)
Slider.disabledForeground=#c0c0c0
Slider.focusedColor=fade($Component.focusColor,50%,derived)
Slider.hoverThumbColor=lighten($Slider.thumbColor,10%,derived)
Slider.pressedThumbColor=lighten($Slider.thumbColor,15%,derived)
Slider.disabledTrackColor=#c0c0c0
Slider.disabledThumbColor=$Slider.disabledTrackColor
#---- SplitPane ----

View File

@@ -35,6 +35,11 @@ Button.default.hoverBorderColor=null
HelpButton.hoverBorderColor=null
#---- Slider ----
Slider.focusedColor=fade($Component.focusColor,40%,derived)
#---- ToggleButton ----
ToggleButton.startBackground=$ToggleButton.background
@@ -60,6 +65,8 @@ ToggleButton.endBackground=$ToggleButton.background
[Cobalt_2]CheckBox.icon.background=#002946
[Cobalt_2]CheckBox.icon.checkmarkColor=#002946
[Dark_purple]Slider.focusedColor=fade($Component.focusColor,70%,derived)
[Dracula]ProgressBar.selectionBackground=#fff
[Dracula]ProgressBar.selectionForeground=#fff
@@ -81,6 +88,15 @@ ToggleButton.endBackground=$ToggleButton.background
[High_contrast]ToggleButton.disabledSelectedBackground=#444
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff
[One_Dark]Slider.focusedColor=fade(#568af2,40%)
[Solarized_Dark]Slider.focusedColor=fade($Component.focusColor,80%,derived)
[vuesion-theme]Slider.trackValueColor=#ececee
[vuesion-theme]Slider.trackColor=#303a45
[vuesion-theme]Slider.thumbColor=#ececee
[vuesion-theme]Slider.focusedColor=fade(#ececee,20%)
# Material Theme UI Lite

View File

@@ -136,6 +136,16 @@ class ControlBar
registerSwitchToLookAndFeel( KeyEvent.VK_F12, MetalLookAndFeel.class.getName() );
registerSwitchToLookAndFeel( KeyEvent.VK_F11, NimbusLookAndFeel.class.getName() );
// register Alt+UP and Alt+DOWN to switch to previous/next theme
((JComponent)frame.getContentPane()).registerKeyboardAction(
e -> frame.themesPanel.selectPreviousTheme(),
KeyStroke.getKeyStroke( KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK ),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
((JComponent)frame.getContentPane()).registerKeyboardAction(
e -> frame.themesPanel.selectNextTheme(),
KeyStroke.getKeyStroke( KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK ),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT );
// register ESC key to close frame
((JComponent)frame.getContentPane()).registerKeyboardAction(
e -> {

View File

@@ -749,6 +749,6 @@ class DemoFrame
private JCheckBoxMenuItem animatedLafChangeMenuItem;
private JTabbedPane tabbedPane;
private ControlBar controlBar;
private IJThemesPanel themesPanel;
IJThemesPanel themesPanel;
// JFormDesigner - End of variables declaration //GEN-END:variables
}

View File

@@ -117,6 +117,7 @@ new FormModel {
name: "themesPanel"
auxiliary() {
"JavaCodeGenerator.variableLocal": false
"JavaCodeGenerator.variableModifiers": 0
}
}, new FormLayoutConstraints( class java.lang.String ) {
"value": "East"

View File

@@ -49,7 +49,9 @@ public class IJThemesClassGenerator
}
Path out = new File( toPath, "FlatAllIJThemes.java" ).toPath();
String allThemes = CLASS_HEADER + ALL_THEMES_TEMPLATE.replace( "${allInfos}", allInfos );
String allThemes = (CLASS_HEADER + ALL_THEMES_TEMPLATE)
.replace( "${subPackage}", "" )
.replace( "${allInfos}", allInfos );
writeFile( out, allThemes );
System.out.println( markdownTable );
@@ -88,7 +90,7 @@ public class IJThemesClassGenerator
String themeClass = "Flat" + buf + "IJTheme";
String themeFile = resourceName;
String classBody = CLASS_HEADER + CLASS_TEMPLATE
String classBody = (CLASS_HEADER + CLASS_TEMPLATE)
.replace( "${subPackage}", subPackage )
.replace( "${themeClass}", themeClass )
.replace( "${themeFile}", themeFile )
@@ -138,6 +140,8 @@ public class IJThemesClassGenerator
" * limitations under the License.\n" +
" */\n" +
"\n" +
"package com.formdev.flatlaf.intellijthemes${subPackage};\n" +
"\n" +
"//\n" +
"// DO NOT MODIFY\n" +
"// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator\n" +
@@ -145,8 +149,6 @@ public class IJThemesClassGenerator
"\n";
private static final String CLASS_TEMPLATE =
"package com.formdev.flatlaf.intellijthemes${subPackage};\n" +
"\n" +
"import com.formdev.flatlaf.IntelliJTheme;\n" +
"\n" +
"/**\n" +
@@ -155,7 +157,9 @@ public class IJThemesClassGenerator
"public class ${themeClass}\n" +
" extends IntelliJTheme.ThemeLaf\n" +
"{\n" +
" public static boolean install( ) {\n" +
" public static final String NAME = \"${themeName}\";\n" +
"\n" +
" public static boolean install() {\n" +
" try {\n" +
" return install( new ${themeClass}() );\n" +
" } catch( RuntimeException ex ) {\n" +
@@ -163,19 +167,21 @@ public class IJThemesClassGenerator
" }\n" +
" }\n" +
"\n" +
" public static void installLafInfo() {\n" +
" installLafInfo( NAME, ${themeClass}.class );\n" +
" }\n" +
"\n" +
" public ${themeClass}() {\n" +
" super( Utils.loadTheme( \"${themeFile}\" ) );\n" +
" }\n" +
"\n" +
" @Override\n" +
" public String getName() {\n" +
" return \"${themeName}\";\n" +
" return NAME;\n" +
" }\n" +
"}\n";
private static final String ALL_THEMES_TEMPLATE =
"package com.formdev.flatlaf.intellijthemes;\n" +
"\n" +
"import javax.swing.UIManager.LookAndFeelInfo;\n" +
"\n" +
"/**\n" +

View File

@@ -220,6 +220,17 @@ public class IJThemesPanel
}
}
public void selectPreviousTheme() {
int sel = themesList.getSelectedIndex();
if( sel > 0 )
themesList.setSelectedIndex( sel - 1 );
}
public void selectNextTheme() {
int sel = themesList.getSelectedIndex();
themesList.setSelectedIndex( sel + 1 );
}
private void themesListValueChanged( ListSelectionEvent e ) {
IJThemeInfo themeInfo = themesList.getSelectedValue();
boolean bundledTheme = (themeInfo != null && themeInfo.resourceName != null);

View File

@@ -4,14 +4,14 @@
"license": "MIT",
"licenseFile": "arc-themes.LICENSE.txt",
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
"sourceCodePath": "blob/master/resources/arc-theme.theme.json"
"sourceCodePath": "blob/master/arc-theme-idea-light/resources/arc-theme.theme.json"
},
"arc-theme-orange.theme.json": {
"name": "Arc - Orange",
"license": "MIT",
"licenseFile": "arc-themes.LICENSE.txt",
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
"sourceCodePath": "blob/master/resources/arc-theme-orange.theme.json"
"sourceCodePath": "blob/master/arc-theme-idea-light/resources/arc-theme-orange.theme.json"
},
"arc_theme_dark.theme.json": {
"name": "Arc Dark",
@@ -19,7 +19,7 @@
"license": "MIT",
"licenseFile": "arc-themes.LICENSE.txt",
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
"sourceCodePath": "blob/master/resources/arc_theme_dark.theme.json"
"sourceCodePath": "blob/master/arc-theme-idea-dark/resources/arc_theme_dark.theme.json"
},
"arc_theme_dark_orange.theme.json": {
"name": "Arc Dark - Orange",
@@ -27,7 +27,7 @@
"license": "MIT",
"licenseFile": "arc-themes.LICENSE.txt",
"sourceCodeUrl": "https://gitlab.com/zlamalp/arc-theme-idea",
"sourceCodePath": "blob/master/resources/arc_theme_dark_orange.theme.json"
"sourceCodePath": "blob/master/arc-theme-idea-dark/resources/arc_theme_dark_orange.theme.json"
},
"Carbon.theme.json": {
"name": "Carbon",
@@ -74,7 +74,7 @@
"license": "MIT",
"licenseFile": "Dracula.LICENSE.txt",
"sourceCodeUrl": "https://github.com/dracula/jetbrains",
"sourceCodePath": "blob/master/src/main/resources/themes/Dracula.theme.json"
"sourceCodePath": "blob/master/src/main/resources/themes/dracula.theme.json"
},
"Gradianto_dark_fuchsia.theme.json": {
"name": "Gradianto Dark Fuchsia",
@@ -100,6 +100,14 @@
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
"sourceCodePath": "blob/master/src/main/resources/Gradianto_midnight_blue.theme.json"
},
"Gradianto_Nature_Green.theme.json": {
"name": "Gradianto Nature Green",
"dark": true,
"license": "MIT",
"licenseFile": "Gradianto.LICENSE.txt",
"sourceCodeUrl": "https://github.com/thvardhan/Gradianto",
"sourceCodePath": "blob/master/src/main/resources/Gradianto_Nature_Green.theme.json"
},
"Gray.theme.json": {
"name": "Gray",
"license": "MIT",

View File

@@ -22,7 +22,7 @@ plugins {
dependencies {
implementation( project( ":flatlaf-core" ) )
implementation( "com.formdev:svgSalamander:1.1.2.3" )
implementation( "com.formdev:svgSalamander:1.1.2.4" )
}
flatlafModuleInfo {

View File

@@ -60,6 +60,7 @@ Name | Class
[Gradianto Dark Fuchsia](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme`
[Gradianto Deep Ocean](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme`
[Gradianto Midnight Blue](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme`
[Gradianto Nature Green](https://github.com/thvardhan/Gradianto) | `com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme`
[Gray](https://github.com/OlyaB/GreyTheme) | `com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme`
[Gruvbox Dark Hard](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme`
[Gruvbox Dark Medium](https://github.com/Vincent-P/gruvbox-intellij-theme) | `com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme`

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import javax.swing.UIManager.LookAndFeelInfo;
/**
@@ -42,6 +42,7 @@ public class FlatAllIJThemes
new LookAndFeelInfo( "Gradianto Dark Fuchsia", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDarkFuchsiaIJTheme" ),
new LookAndFeelInfo( "Gradianto Deep Ocean", "com.formdev.flatlaf.intellijthemes.FlatGradiantoDeepOceanIJTheme" ),
new LookAndFeelInfo( "Gradianto Midnight Blue", "com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme" ),
new LookAndFeelInfo( "Gradianto Nature Green", "com.formdev.flatlaf.intellijthemes.FlatGradiantoNatureGreenIJTheme" ),
new LookAndFeelInfo( "Gray", "com.formdev.flatlaf.intellijthemes.FlatGrayIJTheme" ),
new LookAndFeelInfo( "Gruvbox Dark Hard", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkHardIJTheme" ),
new LookAndFeelInfo( "Gruvbox Dark Medium", "com.formdev.flatlaf.intellijthemes.FlatGruvboxDarkMediumIJTheme" ),

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc Dark";
public static boolean install() {
try {
return install( new FlatArcDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkIJTheme.class );
}
public FlatArcDarkIJTheme() {
super( Utils.loadTheme( "arc_theme_dark.theme.json" ) );
}
@Override
public String getName() {
return "Arc Dark";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcDarkOrangeIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc Dark - Orange";
public static boolean install() {
try {
return install( new FlatArcDarkOrangeIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcDarkOrangeIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkOrangeIJTheme.class );
}
public FlatArcDarkOrangeIJTheme() {
super( Utils.loadTheme( "arc_theme_dark_orange.theme.json" ) );
}
@Override
public String getName() {
return "Arc Dark - Orange";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc";
public static boolean install() {
try {
return install( new FlatArcIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcIJTheme.class );
}
public FlatArcIJTheme() {
super( Utils.loadTheme( "arc-theme.theme.json" ) );
}
@Override
public String getName() {
return "Arc";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcOrangeIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc - Orange";
public static boolean install() {
try {
return install( new FlatArcOrangeIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcOrangeIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcOrangeIJTheme.class );
}
public FlatArcOrangeIJTheme() {
super( Utils.loadTheme( "arc-theme-orange.theme.json" ) );
}
@Override
public String getName() {
return "Arc - Orange";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatCarbonIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Carbon";
public static boolean install() {
try {
return install( new FlatCarbonIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatCarbonIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCarbonIJTheme.class );
}
public FlatCarbonIJTheme() {
super( Utils.loadTheme( "Carbon.theme.json" ) );
}
@Override
public String getName() {
return "Carbon";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatCobalt2IJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Cobalt 2";
public static boolean install() {
try {
return install( new FlatCobalt2IJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatCobalt2IJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCobalt2IJTheme.class );
}
public FlatCobalt2IJTheme() {
super( Utils.loadTheme( "Cobalt_2.theme.json" ) );
}
@Override
public String getName() {
return "Cobalt 2";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatCyanLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Cyan light";
public static boolean install() {
try {
return install( new FlatCyanLightIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatCyanLightIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatCyanLightIJTheme.class );
}
public FlatCyanLightIJTheme() {
super( Utils.loadTheme( "Cyan.theme.json" ) );
}
@Override
public String getName() {
return "Cyan light";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatDarkFlatIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Dark Flat";
public static boolean install() {
try {
return install( new FlatDarkFlatIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatDarkFlatIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDarkFlatIJTheme.class );
}
public FlatDarkFlatIJTheme() {
super( Utils.loadTheme( "DarkFlatTheme.theme.json" ) );
}
@Override
public String getName() {
return "Dark Flat";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatDarkPurpleIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Dark purple";
public static boolean install() {
try {
return install( new FlatDarkPurpleIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatDarkPurpleIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDarkPurpleIJTheme.class );
}
public FlatDarkPurpleIJTheme() {
super( Utils.loadTheme( "DarkPurple.theme.json" ) );
}
@Override
public String getName() {
return "Dark purple";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatDraculaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Dracula";
public static boolean install() {
try {
return install( new FlatDraculaIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatDraculaIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDraculaIJTheme.class );
}
public FlatDraculaIJTheme() {
super( Utils.loadTheme( "Dracula.theme.json" ) );
}
@Override
public String getName() {
return "Dracula";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGradiantoDarkFuchsiaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gradianto Dark Fuchsia";
public static boolean install() {
try {
return install( new FlatGradiantoDarkFuchsiaIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGradiantoDarkFuchsiaIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoDarkFuchsiaIJTheme.class );
}
public FlatGradiantoDarkFuchsiaIJTheme() {
super( Utils.loadTheme( "Gradianto_dark_fuchsia.theme.json" ) );
}
@Override
public String getName() {
return "Gradianto Dark Fuchsia";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGradiantoDeepOceanIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gradianto Deep Ocean";
public static boolean install() {
try {
return install( new FlatGradiantoDeepOceanIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGradiantoDeepOceanIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoDeepOceanIJTheme.class );
}
public FlatGradiantoDeepOceanIJTheme() {
super( Utils.loadTheme( "Gradianto_deep_ocean.theme.json" ) );
}
@Override
public String getName() {
return "Gradianto Deep Ocean";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGradiantoMidnightBlueIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gradianto Midnight Blue";
public static boolean install() {
try {
return install( new FlatGradiantoMidnightBlueIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGradiantoMidnightBlueIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoMidnightBlueIJTheme.class );
}
public FlatGradiantoMidnightBlueIJTheme() {
super( Utils.loadTheme( "Gradianto_midnight_blue.theme.json" ) );
}
@Override
public String getName() {
return "Gradianto Midnight Blue";
return NAME;
}
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2020 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.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
import com.formdev.flatlaf.IntelliJTheme;
/**
* @author Karl Tauber
*/
public class FlatGradiantoNatureGreenIJTheme
extends IntelliJTheme.ThemeLaf
{
public static final String NAME = "Gradianto Nature Green";
public static boolean install() {
try {
return install( new FlatGradiantoNatureGreenIJTheme() );
} catch( RuntimeException ex ) {
return false;
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGradiantoNatureGreenIJTheme.class );
}
public FlatGradiantoNatureGreenIJTheme() {
super( Utils.loadTheme( "Gradianto_Nature_Green.theme.json" ) );
}
@Override
public String getName() {
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGrayIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gray";
public static boolean install() {
try {
return install( new FlatGrayIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGrayIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGrayIJTheme.class );
}
public FlatGrayIJTheme() {
super( Utils.loadTheme( "Gray.theme.json" ) );
}
@Override
public String getName() {
return "Gray";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGruvboxDarkHardIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gruvbox Dark Hard";
public static boolean install() {
try {
return install( new FlatGruvboxDarkHardIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGruvboxDarkHardIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkHardIJTheme.class );
}
public FlatGruvboxDarkHardIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_hard.theme.json" ) );
}
@Override
public String getName() {
return "Gruvbox Dark Hard";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGruvboxDarkMediumIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gruvbox Dark Medium";
public static boolean install() {
try {
return install( new FlatGruvboxDarkMediumIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGruvboxDarkMediumIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkMediumIJTheme.class );
}
public FlatGruvboxDarkMediumIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_medium.theme.json" ) );
}
@Override
public String getName() {
return "Gruvbox Dark Medium";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGruvboxDarkSoftIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Gruvbox Dark Soft";
public static boolean install() {
try {
return install( new FlatGruvboxDarkSoftIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGruvboxDarkSoftIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGruvboxDarkSoftIJTheme.class );
}
public FlatGruvboxDarkSoftIJTheme() {
super( Utils.loadTheme( "gruvbox_dark_soft.theme.json" ) );
}
@Override
public String getName() {
return "Gruvbox Dark Soft";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatHiberbeeDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Hiberbee Dark";
public static boolean install() {
try {
return install( new FlatHiberbeeDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatHiberbeeDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatHiberbeeDarkIJTheme.class );
}
public FlatHiberbeeDarkIJTheme() {
super( Utils.loadTheme( "HiberbeeDark.theme.json" ) );
}
@Override
public String getName() {
return "Hiberbee Dark";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatHighContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "High contrast";
public static boolean install() {
try {
return install( new FlatHighContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatHighContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatHighContrastIJTheme.class );
}
public FlatHighContrastIJTheme() {
super( Utils.loadTheme( "HighContrast.theme.json" ) );
}
@Override
public String getName() {
return "High contrast";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatLightFlatIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Light Flat";
public static boolean install() {
try {
return install( new FlatLightFlatIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatLightFlatIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatLightFlatIJTheme.class );
}
public FlatLightFlatIJTheme() {
super( Utils.loadTheme( "LightFlatTheme.theme.json" ) );
}
@Override
public String getName() {
return "Light Flat";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialDesignDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Design Dark";
public static boolean install() {
try {
return install( new FlatMaterialDesignDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialDesignDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDesignDarkIJTheme.class );
}
public FlatMaterialDesignDarkIJTheme() {
super( Utils.loadTheme( "MaterialTheme.theme.json" ) );
}
@Override
public String getName() {
return "Material Design Dark";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMonocaiIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Monocai";
public static boolean install() {
try {
return install( new FlatMonocaiIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMonocaiIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMonocaiIJTheme.class );
}
public FlatMonocaiIJTheme() {
super( Utils.loadTheme( "Monocai.theme.json" ) );
}
@Override
public String getName() {
return "Monocai";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatNordIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Nord";
public static boolean install() {
try {
return install( new FlatNordIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatNordIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatNordIJTheme.class );
}
public FlatNordIJTheme() {
super( Utils.loadTheme( "nord.theme.json" ) );
}
@Override
public String getName() {
return "Nord";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatOneDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "One Dark";
public static boolean install() {
try {
return install( new FlatOneDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatOneDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatOneDarkIJTheme.class );
}
public FlatOneDarkIJTheme() {
super( Utils.loadTheme( "one_dark.theme.json" ) );
}
@Override
public String getName() {
return "One Dark";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Dark";
public static boolean install() {
try {
return install( new FlatSolarizedDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedDarkIJTheme.class );
}
public FlatSolarizedDarkIJTheme() {
super( Utils.loadTheme( "SolarizedDark.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Dark";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Light";
public static boolean install() {
try {
return install( new FlatSolarizedLightIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedLightIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedLightIJTheme.class );
}
public FlatSolarizedLightIJTheme() {
super( Utils.loadTheme( "SolarizedLight.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Light";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSpacegrayIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Spacegray";
public static boolean install() {
try {
return install( new FlatSpacegrayIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSpacegrayIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSpacegrayIJTheme.class );
}
public FlatSpacegrayIJTheme() {
super( Utils.loadTheme( "Spacegray.theme.json" ) );
}
@Override
public String getName() {
return "Spacegray";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatVuesionIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Vuesion";
public static boolean install() {
try {
return install( new FlatVuesionIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatVuesionIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatVuesionIJTheme.class );
}
public FlatVuesionIJTheme() {
super( Utils.loadTheme( "vuesion_theme.theme.json" ) );
}
@Override
public String getName() {
return "Vuesion";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcDarkContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc Dark Contrast (Material)";
public static boolean install() {
try {
return install( new FlatArcDarkContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcDarkContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkContrastIJTheme.class );
}
public FlatArcDarkContrastIJTheme() {
super( Utils.loadTheme( "Arc Dark Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Arc Dark Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatArcDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Arc Dark (Material)";
public static boolean install() {
try {
return install( new FlatArcDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatArcDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatArcDarkIJTheme.class );
}
public FlatArcDarkIJTheme() {
super( Utils.loadTheme( "Arc Dark.theme.json" ) );
}
@Override
public String getName() {
return "Arc Dark (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatAtomOneDarkContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Atom One Dark Contrast (Material)";
public static boolean install() {
try {
return install( new FlatAtomOneDarkContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatAtomOneDarkContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneDarkContrastIJTheme.class );
}
public FlatAtomOneDarkContrastIJTheme() {
super( Utils.loadTheme( "Atom One Dark Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Atom One Dark Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatAtomOneDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Atom One Dark (Material)";
public static boolean install() {
try {
return install( new FlatAtomOneDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatAtomOneDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneDarkIJTheme.class );
}
public FlatAtomOneDarkIJTheme() {
super( Utils.loadTheme( "Atom One Dark.theme.json" ) );
}
@Override
public String getName() {
return "Atom One Dark (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatAtomOneLightContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Atom One Light Contrast (Material)";
public static boolean install() {
try {
return install( new FlatAtomOneLightContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatAtomOneLightContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneLightContrastIJTheme.class );
}
public FlatAtomOneLightContrastIJTheme() {
super( Utils.loadTheme( "Atom One Light Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Atom One Light Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatAtomOneLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Atom One Light (Material)";
public static boolean install() {
try {
return install( new FlatAtomOneLightIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatAtomOneLightIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatAtomOneLightIJTheme.class );
}
public FlatAtomOneLightIJTheme() {
super( Utils.loadTheme( "Atom One Light.theme.json" ) );
}
@Override
public String getName() {
return "Atom One Light (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatDraculaContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Dracula Contrast (Material)";
public static boolean install() {
try {
return install( new FlatDraculaContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatDraculaContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDraculaContrastIJTheme.class );
}
public FlatDraculaContrastIJTheme() {
super( Utils.loadTheme( "Dracula Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Dracula Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatDraculaIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Dracula (Material)";
public static boolean install() {
try {
return install( new FlatDraculaIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatDraculaIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatDraculaIJTheme.class );
}
public FlatDraculaIJTheme() {
super( Utils.loadTheme( "Dracula.theme.json" ) );
}
@Override
public String getName() {
return "Dracula (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGitHubContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "GitHub Contrast (Material)";
public static boolean install() {
try {
return install( new FlatGitHubContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGitHubContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGitHubContrastIJTheme.class );
}
public FlatGitHubContrastIJTheme() {
super( Utils.loadTheme( "GitHub Contrast.theme.json" ) );
}
@Override
public String getName() {
return "GitHub Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatGitHubIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "GitHub (Material)";
public static boolean install() {
try {
return install( new FlatGitHubIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatGitHubIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatGitHubIJTheme.class );
}
public FlatGitHubIJTheme() {
super( Utils.loadTheme( "GitHub.theme.json" ) );
}
@Override
public String getName() {
return "GitHub (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatLightOwlContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Light Owl Contrast (Material)";
public static boolean install() {
try {
return install( new FlatLightOwlContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatLightOwlContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatLightOwlContrastIJTheme.class );
}
public FlatLightOwlContrastIJTheme() {
super( Utils.loadTheme( "Light Owl Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Light Owl Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatLightOwlIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Light Owl (Material)";
public static boolean install() {
try {
return install( new FlatLightOwlIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatLightOwlIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatLightOwlIJTheme.class );
}
public FlatLightOwlIJTheme() {
super( Utils.loadTheme( "Light Owl.theme.json" ) );
}
@Override
public String getName() {
return "Light Owl (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialDarkerContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Darker Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMaterialDarkerContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialDarkerContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDarkerContrastIJTheme.class );
}
public FlatMaterialDarkerContrastIJTheme() {
super( Utils.loadTheme( "Material Darker Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Material Darker Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialDarkerIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Darker (Material)";
public static boolean install() {
try {
return install( new FlatMaterialDarkerIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialDarkerIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDarkerIJTheme.class );
}
public FlatMaterialDarkerIJTheme() {
super( Utils.loadTheme( "Material Darker.theme.json" ) );
}
@Override
public String getName() {
return "Material Darker (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialDeepOceanContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Deep Ocean Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMaterialDeepOceanContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialDeepOceanContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDeepOceanContrastIJTheme.class );
}
public FlatMaterialDeepOceanContrastIJTheme() {
super( Utils.loadTheme( "Material Deep Ocean Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Material Deep Ocean Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialDeepOceanIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Deep Ocean (Material)";
public static boolean install() {
try {
return install( new FlatMaterialDeepOceanIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialDeepOceanIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialDeepOceanIJTheme.class );
}
public FlatMaterialDeepOceanIJTheme() {
super( Utils.loadTheme( "Material Deep Ocean.theme.json" ) );
}
@Override
public String getName() {
return "Material Deep Ocean (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialLighterContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Lighter Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMaterialLighterContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialLighterContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialLighterContrastIJTheme.class );
}
public FlatMaterialLighterContrastIJTheme() {
super( Utils.loadTheme( "Material Lighter Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Material Lighter Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialLighterIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Lighter (Material)";
public static boolean install() {
try {
return install( new FlatMaterialLighterIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialLighterIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialLighterIJTheme.class );
}
public FlatMaterialLighterIJTheme() {
super( Utils.loadTheme( "Material Lighter.theme.json" ) );
}
@Override
public String getName() {
return "Material Lighter (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialOceanicContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Oceanic Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMaterialOceanicContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialOceanicContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialOceanicContrastIJTheme.class );
}
public FlatMaterialOceanicContrastIJTheme() {
super( Utils.loadTheme( "Material Oceanic Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Material Oceanic Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialOceanicIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Oceanic (Material)";
public static boolean install() {
try {
return install( new FlatMaterialOceanicIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialOceanicIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialOceanicIJTheme.class );
}
public FlatMaterialOceanicIJTheme() {
super( Utils.loadTheme( "Material Oceanic.theme.json" ) );
}
@Override
public String getName() {
return "Material Oceanic (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialPalenightContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Palenight Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMaterialPalenightContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialPalenightContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialPalenightContrastIJTheme.class );
}
public FlatMaterialPalenightContrastIJTheme() {
super( Utils.loadTheme( "Material Palenight Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Material Palenight Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMaterialPalenightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Material Palenight (Material)";
public static boolean install() {
try {
return install( new FlatMaterialPalenightIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMaterialPalenightIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMaterialPalenightIJTheme.class );
}
public FlatMaterialPalenightIJTheme() {
super( Utils.loadTheme( "Material Palenight.theme.json" ) );
}
@Override
public String getName() {
return "Material Palenight (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMonokaiProContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Monokai Pro Contrast (Material)";
public static boolean install() {
try {
return install( new FlatMonokaiProContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMonokaiProContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMonokaiProContrastIJTheme.class );
}
public FlatMonokaiProContrastIJTheme() {
super( Utils.loadTheme( "Monokai Pro Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Monokai Pro Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatMonokaiProIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Monokai Pro (Material)";
public static boolean install() {
try {
return install( new FlatMonokaiProIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatMonokaiProIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatMonokaiProIJTheme.class );
}
public FlatMonokaiProIJTheme() {
super( Utils.loadTheme( "Monokai Pro.theme.json" ) );
}
@Override
public String getName() {
return "Monokai Pro (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatNightOwlContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Night Owl Contrast (Material)";
public static boolean install() {
try {
return install( new FlatNightOwlContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatNightOwlContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatNightOwlContrastIJTheme.class );
}
public FlatNightOwlContrastIJTheme() {
super( Utils.loadTheme( "Night Owl Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Night Owl Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatNightOwlIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Night Owl (Material)";
public static boolean install() {
try {
return install( new FlatNightOwlIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatNightOwlIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatNightOwlIJTheme.class );
}
public FlatNightOwlIJTheme() {
super( Utils.loadTheme( "Night Owl.theme.json" ) );
}
@Override
public String getName() {
return "Night Owl (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedDarkContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Dark Contrast (Material)";
public static boolean install() {
try {
return install( new FlatSolarizedDarkContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedDarkContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedDarkContrastIJTheme.class );
}
public FlatSolarizedDarkContrastIJTheme() {
super( Utils.loadTheme( "Solarized Dark Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Dark Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedDarkIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Dark (Material)";
public static boolean install() {
try {
return install( new FlatSolarizedDarkIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedDarkIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedDarkIJTheme.class );
}
public FlatSolarizedDarkIJTheme() {
super( Utils.loadTheme( "Solarized Dark.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Dark (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedLightContrastIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Light Contrast (Material)";
public static boolean install() {
try {
return install( new FlatSolarizedLightContrastIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedLightContrastIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedLightContrastIJTheme.class );
}
public FlatSolarizedLightContrastIJTheme() {
super( Utils.loadTheme( "Solarized Light Contrast.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Light Contrast (Material)";
return NAME;
}
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
//
// DO NOT MODIFY
// Generated with com.formdev.flatlaf.demo.intellijthemes.IJThemesClassGenerator
//
package com.formdev.flatlaf.intellijthemes.materialthemeuilite;
import com.formdev.flatlaf.IntelliJTheme;
/**
@@ -29,7 +29,9 @@ import com.formdev.flatlaf.IntelliJTheme;
public class FlatSolarizedLightIJTheme
extends IntelliJTheme.ThemeLaf
{
public static boolean install( ) {
public static final String NAME = "Solarized Light (Material)";
public static boolean install() {
try {
return install( new FlatSolarizedLightIJTheme() );
} catch( RuntimeException ex ) {
@@ -37,12 +39,16 @@ public class FlatSolarizedLightIJTheme
}
}
public static void installLafInfo() {
installLafInfo( NAME, FlatSolarizedLightIJTheme.class );
}
public FlatSolarizedLightIJTheme() {
super( Utils.loadTheme( "Solarized Light.theme.json" ) );
}
@Override
public String getName() {
return "Solarized Light (Material)";
return NAME;
}
}

View File

@@ -88,6 +88,10 @@
"hoverBackground": "#ced2d9"
},
"DragAndDrop": {
"areaBackground": "#4cb2c733"
},
"Editor": {
"background": "#d0d3d9",
"foreground": "#808080",
@@ -201,7 +205,10 @@
"contentAreaColor": "#bec5cd"
},
"Table.background": "#eef0f4",
"Table": {
"background": "#eef0f4",
"hoverBackground": "#C3D2E366"
},
"TableHeader": {
"cellBorder": "3,0,3,0",
@@ -242,7 +249,12 @@
}
},
"Tree.background": "#eef0f4"
"Tree.background": "#eef0f4",
"WelcomeScreen": {
"Details.background": "#eef0f4",
"Projects.actions.background": "#E1E4EB"
}
},
"icons": {

View File

@@ -51,7 +51,8 @@
"hoverBackground": "#453e57",
"hoverBorderColor": "#453E57",
"pressedBackground": "#49415c",
"pressedBorderColor": "#49415C"
"pressedBorderColor": "#49415C",
"focusedBorderColor": "#476fcc"
},
"Button": {
@@ -94,7 +95,8 @@
"matchForeground": "#ED94FF",
"matchSelectionForeground": "#ED94FF",
"selectionInactiveBackground": "#44405c",
"nonFocusedMask": "#00000033"
"nonFocusedMask": "#00000033",
"selectionBackground": "#623380"
},
"Component": {
@@ -123,7 +125,7 @@
"DragAndDrop": {
"areaForeground": "#D0D0D9",
"areaBackground": "#702F91",
"areaBackground": "#5d476680",
"areaBorderColor": "#343142"
},
@@ -166,7 +168,7 @@
"visitedForeground": "#7094FF"
},
"MenuBar.borderColor": "##1a1721",
"MenuBar.borderColor": "#1a1721",
"NavBar.borderColor": "#1a1721",
@@ -280,6 +282,8 @@
"endBackground": "#cca929"
},
"SearchOption.selectedBackground": "#424885",
"SpeedSearch": {
"foreground": "#D0D0D9",
"borderColor": "#69418c",
@@ -304,7 +308,10 @@
"bottomSeparatorColor": "#282430"
},
"Table.stripeColor": "#323242",
"Table": {
"stripeColor": "#323242",
"hoverBackground": "#00000028"
},
"TextArea": {
"background": "#3A384D",
@@ -327,7 +334,9 @@
"ToolTip": {
"background": "#463f57",
"Actions.background": "#323245"
"Actions.background": "#323245",
"infoForeground": "#8985a1",
"shortcutForeground": "#8985A1"
},
"ToolWindow": {
@@ -363,14 +372,17 @@
"VersionControl": {
"Log.Commit": {
"currentBranchBackground": "#202340",
"unmatchedForeground": "#6d6a80"
"unmatchedForeground": "#6d6a80",
"hoveredBackground": "#000000B9"
},
"FileHistory.Commit.selectedBranchBackground": "#202340"
},
"WelcomeScreen": {
"Projects.selectionInactiveBackground": "#713a91",
"separatorColor": "#1a1721"
"separatorColor": "#1a1721",
"Details.background": "#26262E",
"Projects.actions.background": "#343445"
}
},

Some files were not shown because too many files have changed in this diff Show More