-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support for jspinners, slightly changed jtextfield behaviour for
jtables and possibly fixed pixelated fonts
- Loading branch information
atarw
committed
Jun 13, 2018
1 parent
761d071
commit 867ad4c
Showing
26 changed files
with
560 additions
and
253 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/mdlaf/MaterialUIMovement.java → src/mdlaf/animation/MaterialUIMovement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mdlaf; | ||
package mdlaf.animation; | ||
|
||
import javax.swing.JComponent; | ||
import java.awt.Color; | ||
|
2 changes: 1 addition & 1 deletion
2
src/mdlaf/MaterialUITimer.java → src/mdlaf/animation/MaterialUITimer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mdlaf; | ||
package mdlaf.animation; | ||
|
||
import javax.swing.JComponent; | ||
import javax.swing.Timer; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package mdlaf.components.panel; | ||
|
||
import mdlaf.resources.MaterialDrawingUtils; | ||
import mdlaf.resources.MaterialFonts; | ||
|
||
import javax.swing.BorderFactory; | ||
import javax.swing.JComponent; | ||
import javax.swing.JPanel; | ||
import javax.swing.plaf.ComponentUI; | ||
import javax.swing.plaf.basic.BasicPanelUI; | ||
import java.awt.Color; | ||
import java.awt.Graphics; | ||
|
||
public class MaterialPanelUI extends BasicPanelUI { | ||
|
||
public static ComponentUI createUI (final JComponent c) { | ||
return new MaterialPanelUI (); | ||
} | ||
|
||
@Override | ||
public void installUI (JComponent c) { | ||
super.installUI (c); | ||
|
||
JPanel panel = (JPanel) c; | ||
panel.setOpaque (true); | ||
panel.setFont (MaterialFonts.REGULAR); | ||
panel.setBackground (Color.WHITE); | ||
panel.setBorder (BorderFactory.createEmptyBorder ()); | ||
} | ||
|
||
@Override | ||
public void paint (Graphics g, JComponent c) { | ||
super.paint (MaterialDrawingUtils.getAliasedGraphics (g), c); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package mdlaf.components.spinner; | ||
|
||
import mdlaf.components.textfield.MaterialTextFieldUI; | ||
import mdlaf.resources.MaterialBorders; | ||
import mdlaf.resources.MaterialColors; | ||
import mdlaf.resources.MaterialDrawingUtils; | ||
import mdlaf.resources.MaterialFonts; | ||
import mdlaf.resources.MaterialImages; | ||
|
||
import javax.swing.BorderFactory; | ||
import javax.swing.ImageIcon; | ||
import javax.swing.JButton; | ||
import javax.swing.JComponent; | ||
import javax.swing.JSpinner; | ||
import javax.swing.plaf.ComponentUI; | ||
import javax.swing.plaf.basic.BasicSpinnerUI; | ||
import java.awt.Color; | ||
import java.awt.Component; | ||
import java.awt.Graphics; | ||
|
||
public class MaterialSpinnerUI extends BasicSpinnerUI { | ||
|
||
public static ComponentUI createUI (final JComponent c) { | ||
return new MaterialSpinnerUI (); | ||
} | ||
|
||
@Override | ||
public void installUI (JComponent c) { | ||
super.installUI (c); | ||
|
||
JSpinner spinner = (JSpinner) c; | ||
spinner.setOpaque (false); | ||
spinner.setFont (MaterialFonts.REGULAR); | ||
spinner.setBackground (Color.WHITE); | ||
spinner.setForeground (Color.BLACK); | ||
spinner.setBorder (MaterialBorders.LIGHT_LINE_BORDER); | ||
} | ||
|
||
@Override | ||
protected JComponent createEditor () { | ||
JSpinner.DefaultEditor editor = (JSpinner.DefaultEditor) super.createEditor (); | ||
editor.getTextField ().setUI (new MaterialTextFieldUI (false)); | ||
|
||
return editor; | ||
} | ||
|
||
@Override | ||
public void paint (Graphics g, JComponent c) { | ||
super.paint (MaterialDrawingUtils.getAliasedGraphics (g), c); | ||
} | ||
|
||
@Override | ||
protected Component createNextButton () { | ||
JButton button = new JButton (new ImageIcon (MaterialImages.UP_ARROW)); | ||
|
||
button.setOpaque (true); | ||
button.setBackground (MaterialColors.LIGHT_GRAY); | ||
button.setBorder (BorderFactory.createEmptyBorder ()); | ||
installNextButtonListeners (button); | ||
|
||
return button; | ||
} | ||
|
||
@Override | ||
protected Component createPreviousButton () { | ||
JButton button = new JButton (new ImageIcon (MaterialImages.DOWN_ARROW)); | ||
|
||
button.setOpaque (true); | ||
button.setBackground (MaterialColors.LIGHT_GRAY); | ||
button.setBorder (BorderFactory.createEmptyBorder ()); | ||
installPreviousButtonListeners (button); | ||
|
||
return button; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dlaf/table/MaterialTableCellRenderer.java → ...ents/table/MaterialTableCellRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...able/MaterialTableHeaderCellRenderer.java → ...able/MaterialTableHeaderCellRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.