diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8318b475..d0e3a957 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@ FlatLaf Change Log
## 1.5-SNAPSHOT
+#### New features and improvements
+
+- SwingX: Added search and clear icons to `JXSearchField`. (issue #359)
+
+
#### Fixed bugs
- Button and TextComponent: Do not apply minimum width/height if margins are
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatClearIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatClearIcon.java
new file mode 100644
index 00000000..b756b509
--- /dev/null
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatClearIcon.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2021 FormDev Software GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.formdev.flatlaf.icons;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics2D;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.Line2D;
+import java.awt.geom.Path2D;
+import javax.swing.AbstractButton;
+import javax.swing.ButtonModel;
+import javax.swing.UIManager;
+import com.formdev.flatlaf.ui.FlatUIUtils;
+
+/**
+ * "clear" icon for search fields.
+ *
+ * @uiDefault SearchField.clearIconColor Color
+ * @uiDefault SearchField.clearIconHoverColor Color
+ * @uiDefault SearchField.clearIconPressedColor Color
+ *
+ * @author Karl Tauber
+ * @since 1.5
+ */
+public class FlatClearIcon
+ extends FlatAbstractIcon
+{
+ protected Color clearIconColor = UIManager.getColor( "SearchField.clearIconColor" );
+ protected Color clearIconHoverColor = UIManager.getColor( "SearchField.clearIconHoverColor" );
+ protected Color clearIconPressedColor = UIManager.getColor( "SearchField.clearIconPressedColor" );
+
+ public FlatClearIcon() {
+ super( 16, 16, null );
+ }
+
+ @Override
+ protected void paintIcon( Component c, Graphics2D g ) {
+ if( c instanceof AbstractButton ) {
+ ButtonModel model = ((AbstractButton)c).getModel();
+ if( model.isPressed() || model.isRollover() ) {
+ /*
+
+ */
+
+ // paint filled circle with cross
+ g.setColor( model.isPressed() ? clearIconPressedColor : clearIconHoverColor );
+ Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD );
+ path.append( new Ellipse2D.Float( 1.75f, 1.75f, 12.5f, 12.5f ), false );
+ path.append( FlatUIUtils.createPath( 4.5,5.5, 5.5,4.5, 8,7, 10.5,4.5, 11.5,5.5, 9,8, 11.5,10.5, 10.5,11.5, 8,9, 5.5,11.5, 4.5,10.5, 7,8 ), false );
+ g.fill( path );
+ return;
+ }
+ }
+
+ /*
+
+ */
+
+ // paint cross
+ g.setColor( clearIconColor );
+ Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD );
+ path.append( new Line2D.Float( 5,5, 11,11 ), false );
+ path.append( new Line2D.Float( 5,11, 11,5 ), false );
+ g.draw( path );
+ }
+}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchIcon.java
new file mode 100644
index 00000000..1bc726a6
--- /dev/null
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchIcon.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2021 FormDev Software GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.formdev.flatlaf.icons;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics2D;
+import java.awt.geom.Area;
+import java.awt.geom.Ellipse2D;
+import javax.swing.UIManager;
+import com.formdev.flatlaf.ui.FlatButtonUI;
+import com.formdev.flatlaf.ui.FlatUIUtils;
+
+/**
+ * "search" icon for search fields.
+ *
+ * @uiDefault SearchField.searchIconColor Color
+ * @uiDefault SearchField.searchIconHoverColor Color
+ * @uiDefault SearchField.searchIconPressedColor Color
+ *
+ * @author Karl Tauber
+ * @since 1.5
+ */
+public class FlatSearchIcon
+ extends FlatAbstractIcon
+{
+ protected Color searchIconColor = UIManager.getColor( "SearchField.searchIconColor" );
+ protected Color searchIconHoverColor = UIManager.getColor( "SearchField.searchIconHoverColor" );
+ protected Color searchIconPressedColor = UIManager.getColor( "SearchField.searchIconPressedColor" );
+
+ public FlatSearchIcon() {
+ super( 16, 16, null );
+ }
+
+ @Override
+ protected void paintIcon( Component c, Graphics2D g ) {
+ /*
+
+ */
+
+ g.setColor( FlatButtonUI.buttonStateColor( c, searchIconColor, searchIconColor,
+ null, searchIconHoverColor, searchIconPressedColor ) );
+
+ // paint magnifier
+ Area area = new Area( new Ellipse2D.Float( 2, 2, 10, 10 ) );
+ area.subtract( new Area( new Ellipse2D.Float( 3, 3, 8, 8 ) ) );
+ area.add( new Area( FlatUIUtils.createPath( 10.813,9.75, 14,12.938, 12.938,14, 9.75,10.813 ) ) );
+ g.fill( area );
+ }
+}
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchWithHistoryIcon.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchWithHistoryIcon.java
new file mode 100644
index 00000000..262bb8fc
--- /dev/null
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatSearchWithHistoryIcon.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2021 FormDev Software GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.formdev.flatlaf.icons;
+
+import java.awt.Component;
+import java.awt.Graphics2D;
+import com.formdev.flatlaf.ui.FlatUIUtils;
+
+/**
+ * "search with history" icon for search fields.
+ *
+ * @author Karl Tauber
+ * @since 1.5
+ */
+public class FlatSearchWithHistoryIcon
+ extends FlatSearchIcon
+{
+ public FlatSearchWithHistoryIcon() {
+ }
+
+ @Override
+ protected void paintIcon( Component c, Graphics2D g ) {
+ /*
+
+ */
+
+ // paint magnifier
+ g.translate( -2, 0 );
+ super.paintIcon( c, g );
+ g.translate( 2, 0 );
+
+ // paint history arrow
+ g.fill( FlatUIUtils.createPath( 11,7, 16,7, 13.5,10 ) );
+ }
+}
diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
index 90c86413..5688074e 100644
--- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
+++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties
@@ -514,6 +514,17 @@ ScrollPane.fillUpperCorner = true
ScrollPane.smoothScrolling = true
+#---- SearchField ----
+
+SearchField.searchIconColor = fadeout(Actions.GreyInline,10%,lazy)
+SearchField.searchIconHoverColor = fadeout(Actions.GreyInline,30%,lazy)
+SearchField.searchIconPressedColor = fadeout(Actions.GreyInline,50%,lazy)
+
+SearchField.clearIconColor = fadeout(Actions.GreyInline,50%,lazy)
+SearchField.clearIconHoverColor = $SearchField.clearIconColor
+SearchField.clearIconPressedColor = fadeout(Actions.GreyInline,20%,lazy)
+
+
#---- Separator ----
Separator.height = 3
diff --git a/flatlaf-core/svg/CapsLockIcon.svg b/flatlaf-core/svg/CapsLockIcon.svg
index 1c45373d..a81e218e 100644
--- a/flatlaf-core/svg/CapsLockIcon.svg
+++ b/flatlaf-core/svg/CapsLockIcon.svg
@@ -1,7 +1,7 @@
diff --git a/flatlaf-core/svg/ClearHoveredIcon.svg b/flatlaf-core/svg/ClearHoveredIcon.svg
new file mode 100644
index 00000000..21a9bf01
--- /dev/null
+++ b/flatlaf-core/svg/ClearHoveredIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/flatlaf-core/svg/ClearIcon.svg b/flatlaf-core/svg/ClearIcon.svg
new file mode 100644
index 00000000..092f8b4e
--- /dev/null
+++ b/flatlaf-core/svg/ClearIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/flatlaf-core/svg/FlatLaf Icons.sketch b/flatlaf-core/svg/FlatLaf Icons.sketch
index 708e7fd1..3f5c46d7 100644
Binary files a/flatlaf-core/svg/FlatLaf Icons.sketch and b/flatlaf-core/svg/FlatLaf Icons.sketch differ
diff --git a/flatlaf-core/svg/SearchIcon.svg b/flatlaf-core/svg/SearchIcon.svg
new file mode 100644
index 00000000..08fb4505
--- /dev/null
+++ b/flatlaf-core/svg/SearchIcon.svg
@@ -0,0 +1,6 @@
+
diff --git a/flatlaf-core/svg/SearchWithHistoryIcon.svg b/flatlaf-core/svg/SearchWithHistoryIcon.svg
new file mode 100644
index 00000000..23903a08
--- /dev/null
+++ b/flatlaf-core/svg/SearchWithHistoryIcon.svg
@@ -0,0 +1,7 @@
+
diff --git a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties
index b15408db..54e323ce 100644
--- a/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties
+++ b/flatlaf-swingx/src/main/resources/com/formdev/flatlaf/swingx/FlatLaf.properties
@@ -42,3 +42,18 @@ JXTitledPanel.borderColor = $Button.borderColor
JXTitledPanel.titleBackground = $TaskPane.titleBackgroundGradientStart
JXTitledPanel.titleForeground = $TaskPane.titleForeground
JXTitledPanel.captionInsets = 4,10,4,10
+
+
+#---- SearchField ----
+
+SearchField.icon = com.formdev.flatlaf.icons.FlatSearchIcon
+SearchField.rolloverIcon = lazy(SearchField.icon)
+SearchField.pressedIcon = lazy(SearchField.icon)
+
+SearchField.popupIcon = com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon
+SearchField.popupRolloverIcon = lazy(SearchField.popupIcon)
+SearchField.popupPressedIcon = lazy(SearchField.popupIcon)
+
+SearchField.clearIcon = com.formdev.flatlaf.icons.FlatClearIcon
+SearchField.clearRolloverIcon = lazy(SearchField.clearIcon)
+SearchField.clearPressedIcon = lazy(SearchField.clearIcon)
diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt
index 8ddfceaa..8dab6a59 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0_202.txt
@@ -879,6 +879,25 @@ ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
+#---- SearchField ----
+
+SearchField.clearIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearIconColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconHoverColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconPressedColor [lazy] #7f8b91cc 80% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.icon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.popupIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.pressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.rolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.searchIconColor [lazy] #7f8b91e6 90% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconHoverColor [lazy] #7f8b91b3 70% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconPressedColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+
+
#---- Separator ----
Separator.background #3c3f41 javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt
index 2a118223..d67e290f 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0_202.txt
@@ -884,6 +884,25 @@ ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
+#---- SearchField ----
+
+SearchField.clearIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearIconColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconHoverColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconPressedColor [lazy] #7f8b91cc 80% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.icon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.popupIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.pressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.rolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.searchIconColor [lazy] #7f8b91e6 90% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconHoverColor [lazy] #7f8b91b3 70% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconPressedColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+
+
#---- Separator ----
Separator.background #f2f2f2 javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt
index 833e85f4..4df81a7b 100644
--- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt
+++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0_202.txt
@@ -883,6 +883,25 @@ ScrollPane.smoothScrolling true
ScrollPaneUI com.formdev.flatlaf.ui.FlatScrollPaneUI
+#---- SearchField ----
+
+SearchField.clearIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearIconColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconHoverColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearIconPressedColor [lazy] #7f8b91cc 80% javax.swing.plaf.ColorUIResource [UI]
+SearchField.clearPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.clearRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatClearIcon [UI]
+SearchField.icon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.popupIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupPressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.popupRolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchWithHistoryIcon [UI]
+SearchField.pressedIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.rolloverIcon [lazy] 16,16 com.formdev.flatlaf.icons.FlatSearchIcon [UI]
+SearchField.searchIconColor [lazy] #7f8b91e6 90% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconHoverColor [lazy] #7f8b91b3 70% javax.swing.plaf.ColorUIResource [UI]
+SearchField.searchIconPressedColor [lazy] #7f8b9180 50% javax.swing.plaf.ColorUIResource [UI]
+
+
#---- Separator ----
Separator.background #ccffcc javax.swing.plaf.ColorUIResource [UI]
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.java
index 7b982cc5..07e7afd0 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.java
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.java
@@ -124,6 +124,11 @@ public class FlatSwingXTest
JTextField textField3 = new JTextField();
JLabel label10 = new JLabel();
JTextField textField4 = new JTextField();
+ JLabel label11 = new JLabel();
+ JXSearchField xSearchField1 = new JXSearchField();
+ JXSearchField xSearchField2 = new JXSearchField();
+ JXSearchField xSearchField3 = new JXSearchField();
+ JXSearchField xSearchField4 = new JXSearchField();
JButton button1 = new JButton();
JButton button2 = new JButton();
@@ -146,6 +151,8 @@ public class FlatSwingXTest
"[]" +
"[]" +
"[]" +
+ "[]" +
+ "[]" +
"[37]"));
//---- label1 ----
@@ -425,6 +432,30 @@ public class FlatSwingXTest
}
add(xTitledPanel2, "cell 3 8,grow");
+ //---- label11 ----
+ label11.setText("JXSearchField:");
+ add(label11, "cell 0 9");
+
+ //---- xSearchField1 ----
+ xSearchField1.setText("abc");
+ add(xSearchField1, "cell 1 9,growx");
+
+ //---- xSearchField2 ----
+ xSearchField2.setEnabled(false);
+ xSearchField2.setText("abc");
+ add(xSearchField2, "cell 2 9,growx");
+
+ //---- xSearchField3 ----
+ xSearchField3.setRecentSearchesSaveKey("flatlaf.swingx.search.recent");
+ xSearchField3.setText("abc");
+ add(xSearchField3, "cell 1 10,growx");
+
+ //---- xSearchField4 ----
+ xSearchField4.setRecentSearchesSaveKey("flatlaf.swingx.search.recent");
+ xSearchField4.setEnabled(false);
+ xSearchField4.setText("abc");
+ add(xSearchField4, "cell 2 10,growx");
+
//---- button1 ----
button1.setText("<");
diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.jfd
index 567d0e87..a4d1affd 100644
--- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.jfd
+++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/swingx/FlatSwingXTest.jfd
@@ -1,4 +1,4 @@
-JFDML JFormDesigner: "7.0.0.0.194" Java: "11.0.2" encoding: "UTF-8"
+JFDML JFormDesigner: "7.0.4.0.360" Java: "16" encoding: "UTF-8"
new FormModel {
contentType: "form/swing"
@@ -9,7 +9,7 @@ new FormModel {
add( new FormContainer( "com.formdev.flatlaf.testing.FlatTestPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,insets dialog,hidemode 3"
"$columnConstraints": "[left][][][][fill]"
- "$rowConstraints": "[]0[][]0[top][][][][][][37]"
+ "$rowConstraints": "[]0[][]0[top][][][][][][][][37]"
} ) {
name: "this"
add( new FormComponent( "javax.swing.JLabel" ) {
@@ -354,6 +354,40 @@ new FormModel {
}, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
"value": "cell 3 8,grow"
} )
+ add( new FormComponent( "javax.swing.JLabel" ) {
+ name: "label11"
+ "text": "JXSearchField:"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 0 9"
+ } )
+ add( new FormComponent( "org.jdesktop.swingx.JXSearchField" ) {
+ name: "xSearchField1"
+ "text": "abc"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 9,growx"
+ } )
+ add( new FormComponent( "org.jdesktop.swingx.JXSearchField" ) {
+ name: "xSearchField2"
+ "enabled": false
+ "text": "abc"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 9,growx"
+ } )
+ add( new FormComponent( "org.jdesktop.swingx.JXSearchField" ) {
+ name: "xSearchField3"
+ "recentSearchesSaveKey": "flatlaf.swingx.search.recent"
+ "text": "abc"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 1 10,growx"
+ } )
+ add( new FormComponent( "org.jdesktop.swingx.JXSearchField" ) {
+ name: "xSearchField4"
+ "recentSearchesSaveKey": "flatlaf.swingx.search.recent"
+ "enabled": false
+ "text": "abc"
+ }, new FormLayoutConstraints( class net.miginfocom.layout.CC ) {
+ "value": "cell 2 10,growx"
+ } )
}, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 )
"size": new java.awt.Dimension( 700, 600 )
diff --git a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
index 6c84a82b..c50e3328 100644
--- a/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
+++ b/flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt
@@ -650,6 +650,21 @@ ScrollPane.font
ScrollPane.foreground
ScrollPane.smoothScrolling
ScrollPaneUI
+SearchField.clearIcon
+SearchField.clearIconColor
+SearchField.clearIconHoverColor
+SearchField.clearIconPressedColor
+SearchField.clearPressedIcon
+SearchField.clearRolloverIcon
+SearchField.icon
+SearchField.popupIcon
+SearchField.popupPressedIcon
+SearchField.popupRolloverIcon
+SearchField.pressedIcon
+SearchField.rolloverIcon
+SearchField.searchIconColor
+SearchField.searchIconHoverColor
+SearchField.searchIconPressedColor
Separator.background
Separator.foreground
Separator.height