diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5d1aac4..e1ad8cf 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,17 +6,15 @@
-
+
+
-
-
-
@@ -31,11 +29,11 @@
-
-
+
+
-
-
+
+
@@ -43,15 +41,6 @@
-
-
-
-
-
-
-
-
-
@@ -93,7 +82,6 @@
@@ -199,7 +188,7 @@
-
+
@@ -207,7 +196,7 @@
-
+
@@ -356,9 +345,6 @@
-
-
-
@@ -528,13 +514,6 @@
-
-
-
-
-
-
-
@@ -614,61 +593,81 @@
-
+
-
-
+
+
-
+
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/material-ui-swing.jar b/lib/material-ui-swing.jar
index 7e1284b..da087f9 100644
Binary files a/lib/material-ui-swing.jar and b/lib/material-ui-swing.jar differ
diff --git a/src/MaterialUISwingDemo.java b/src/MaterialUISwingDemo.java
index e5f8835..231dd61 100644
--- a/src/MaterialUISwingDemo.java
+++ b/src/MaterialUISwingDemo.java
@@ -7,7 +7,6 @@
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
-import javax.swing.JRadioButton;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.awt.BorderLayout;
@@ -67,9 +66,6 @@ public static void main (String[] args) {
Color blue = new Color (34, 167, 240);
MaterialUIMovement.add (button, blue, 5, 1000 / 30);
- JRadioButton b = new JRadioButton ("test");
- content.add (b);
-
// make everything visible to the world
frame.pack ();
frame.setVisible (true);
diff --git a/src/mdlaf/MaterialLookAndFeel.java b/src/mdlaf/MaterialLookAndFeel.java
index 6a4ec3b..0ecbc98 100644
--- a/src/mdlaf/MaterialLookAndFeel.java
+++ b/src/mdlaf/MaterialLookAndFeel.java
@@ -10,6 +10,7 @@
import mdlaf.components.password.MaterialPasswordFieldUI;
import mdlaf.components.radiobutton.MaterialRadioButtonUI;
import mdlaf.components.spinner.MaterialSpinnerUI;
+import mdlaf.components.tabbedpane.MaterialTabbedPaneUI;
import mdlaf.components.table.MaterialTableHeaderUI;
import mdlaf.components.table.MaterialTableUI;
import mdlaf.components.textfield.MaterialTextFieldUI;
@@ -39,6 +40,7 @@ public class MaterialLookAndFeel extends BasicLookAndFeel {
private static final String menuUI = MaterialMenuUI.class.getCanonicalName ();
private static final String checkBoxUI = MaterialCheckBoxUI.class.getCanonicalName ();
private static final String radioButtonUI = MaterialRadioButtonUI.class.getCanonicalName ();
+ private static final String tabbedPaneUI = MaterialTabbedPaneUI.class.getCanonicalName ();
@Override
public String getName () {
@@ -82,6 +84,7 @@ protected void initClassDefaults (UIDefaults table) {
table.put ("MenuUI", menuUI);
table.put ("CheckBoxUI", checkBoxUI);
table.put ("RadioButtonUI", radioButtonUI);
+ table.put ("TabbedPaneUI", tabbedPaneUI);
}
@Override
diff --git a/src/mdlaf/components/tabbedpane/MaterialTabbedPaneUI.java b/src/mdlaf/components/tabbedpane/MaterialTabbedPaneUI.java
new file mode 100644
index 0000000..cfee9a6
--- /dev/null
+++ b/src/mdlaf/components/tabbedpane/MaterialTabbedPaneUI.java
@@ -0,0 +1,65 @@
+package mdlaf.components.tabbedpane;
+
+import mdlaf.resources.MaterialColors;
+import mdlaf.resources.MaterialDrawingUtils;
+import mdlaf.resources.MaterialFonts;
+
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JTabbedPane;
+import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicTabbedPaneUI;
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+
+public class MaterialTabbedPaneUI extends BasicTabbedPaneUI {
+
+ public static ComponentUI createUI (JComponent c) {
+ return new MaterialTabbedPaneUI ();
+ }
+
+ @Override
+ public void installUI (JComponent c) {
+ super.installUI (c);
+
+ JTabbedPane tabbedPane = (JTabbedPane) c;
+ tabbedPane.setOpaque (false);
+ tabbedPane.setFont (MaterialFonts.REGULAR);
+ tabbedPane.setBackground (Color.WHITE);
+ tabbedPane.setForeground (Color.BLACK);
+ tabbedPane.setBorder (BorderFactory.createEmptyBorder ());
+
+ darkShadow = null;
+ shadow = null;
+ lightHighlight = MaterialColors.LIGHT_GRAY;
+ }
+
+ @Override
+ public void paint (Graphics g, JComponent c) {
+ super.paint (MaterialDrawingUtils.getAliasedGraphics (g), c);
+ }
+
+ @Override
+ protected void paintTabBackground (Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) {
+ g.setColor (isSelected ? lightHighlight : tabPane.getBackground ());
+ g.fillRect (x, y, w, h);
+ }
+
+ @Override
+ protected void paintTabBorder (Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) {
+ g.setColor (Color.LIGHT_GRAY);
+ g.drawRect (x, y, w, h);
+ }
+
+ @Override
+ protected void paintFocusIndicator (Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {
+ // do nothing
+ }
+
+ @Override
+ protected void paintTab (Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) {
+ // for some reason tabs aren't painted properly by paint()
+ super.paintTab (MaterialDrawingUtils.getAliasedGraphics (g), tabPlacement, rects, tabIndex, iconRect, textRect);
+ }
+}