jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] branch master updated: Update look and feel to tabbed panes as well
Date Sat, 28 Mar 2020 16:29:12 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a21d08  Update look and feel to tabbed panes as well
7a21d08 is described below

commit 7a21d0842568431c26976a730ee88cee96160d63
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Sat Mar 28 19:28:56 2020 +0300

    Update look and feel to tabbed panes as well
    
    On the fly LaF update did not update pages within JTabbedPane
---
 .../src/main/java/org/apache/jorphan/gui/DynamicStyle.java        | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/jorphan/src/main/java/org/apache/jorphan/gui/DynamicStyle.java b/src/jorphan/src/main/java/org/apache/jorphan/gui/DynamicStyle.java
index bc3d63a..15dc73c 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/gui/DynamicStyle.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/gui/DynamicStyle.java
@@ -32,6 +32,7 @@ import java.util.function.Consumer;
 import javax.swing.JComponent;
 import javax.swing.JMenu;
 import javax.swing.JPopupMenu;
+import javax.swing.JTabbedPane;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 
@@ -211,5 +212,12 @@ public class DynamicStyle {
                 collectComponents(child, components);
             }
         }
+        if (root instanceof JTabbedPane) {
+            JTabbedPane tabbedPane = (JTabbedPane) root;
+            int size = tabbedPane.getTabCount();
+            for (int i = 0; i < size; i++) {
+                collectComponents(tabbedPane.getTabComponentAt(i), components);
+            }
+        }
     }
 }


Mime
View raw message