Skip to content

Commit 44b3b60

Browse files
atarwvincenzopalazzo
authored andcommitted
fix support for jscrollbar
1 parent 3ed9f11 commit 44b3b60

File tree

6 files changed

+332
-3
lines changed

6 files changed

+332
-3
lines changed

.idea/workspace.xml

Lines changed: 310 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public class MaterialUISwingDemo {
3636
frame.add (content, BorderLayout.CENTER);
3737

3838
// on hover, button will change to a light blue
39+
<<<<<<< refs/remotes/upstream/master
3940
MaterialUIMovement.add (button, MaterialColors.LIGHT_BLUE_500);
41+
=======
42+
MaterialUIMovement.add (button, MaterialColors.BLUE_400);
43+
>>>>>>> fix support for jscrollbar
4044

4145
frame.pack ();
4246
frame.setVisible (true);

src/MaterialUISwingDemo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public static void main (String[] args) {
7777
// there will be 5 intermediate colors displayed in the transition from the original components color to the new one specified
7878
// the "frame rate" of the transition will be 1000 / 30, or 30 FPS
7979
// the animation will take 5 * 1000 / 30 = 166.666... milliseconds to complete
80+
<<<<<<< refs/remotes/upstream/master
8081
MaterialUIMovement.add (button, MaterialColors.LIGHT_BLUE_500, 5, 1000 / 30);
8182

8283
//
@@ -113,6 +114,9 @@ public static void main (String[] args) {
113114

114115
frame.add (tp, BorderLayout.CENTER);
115116
//
117+
=======
118+
MaterialUIMovement.add (button, MaterialColors.BLUE_400, 5, 1000 / 30);
119+
>>>>>>> fix support for jscrollbar
116120

117121
// make everything visible to the world
118122
frame.pack ();

src/imgs/lefth_arrow.png

147 Bytes
Loading

src/mdlaf/components/scrollbar/MaterialScrollBarUI.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* */
1717

1818
public class MaterialScrollBarUI extends BasicScrollBarUI {
19+
20+
private static boolean DEBUG = false;
1921

2022
public static ComponentUI createUI (JComponent c) {
2123
return new MaterialScrollBarUI ();
@@ -38,7 +40,12 @@ public void installUI (JComponent c) {
3840
public void paint (Graphics g, JComponent c) {
3941
super.paint (MaterialDrawingUtils.getAliasedGraphics (g), c);
4042
}
41-
43+
44+
/**
45+
* @author https://github.com/vincenzopalazzo
46+
* The method takes an integer variable that for the createDecreaseButton
47+
* method takes 7 if the scrollbar is horizontal and 1 if vertical
48+
*/
4249
@Override
4350
protected JButton createDecreaseButton (int orientation) {
4451
JButton button = new BasicArrowButton (orientation);
@@ -50,6 +57,11 @@ protected JButton createDecreaseButton (int orientation) {
5057
return button;
5158
}
5259

60+
/**
61+
* @author https://github.com/vincenzopalazzo
62+
* The method takes an integer variable that for the createIncreaseButton
63+
* method takes 5 if the scrollbar is horizontal and 3 if vertical
64+
*/
5365
@Override
5466
protected JButton createIncreaseButton (int orientation) {
5567
JButton button = new BasicArrowButton (orientation);

src/mdlaf/resources/MaterialImages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
public class MaterialImages {
99

1010
public static final BufferedImage RIGHT_ARROW = loadImg ("/imgs/right_arrow.png");
11+
public static final BufferedImage LEFTH_ARROW = loadImg ("/imgs/lefth_arrow.png");
1112
public static final BufferedImage DOWN_ARROW = loadImg ("/imgs/down_arrow.png");
1213
public static final BufferedImage UP_ARROW = loadImg ("/imgs/up_arrow.png");
1314
public static final BufferedImage PAINTED_CHECKED_BOX = loadImg ("/imgs/painted_checked_box.png");

0 commit comments

Comments
 (0)