|
1 | | -# Material-UI-Swing |
2 | | -[](https://search.maven.org/search?q=g:%22io.github.vincenzopalazzo%22%20AND%20a:%22material-ui-swing%22) |
3 | | - |
| 1 | +# DemoSwingRatio |
4 | 2 |
|
5 | | -<div align="center"> |
6 | | -<img src="https://raw.githubusercontent.com/vincenzopalazzo/material-ui-swing-donations/master/images/iconMaterialOfficial.png" /> |
7 | | -</div> |
8 | | - |
9 | | -A modern, Material Design UI for Java Swing |
10 | | - |
11 | | -Skins JComponents to have a Material Design Look and Feel. Most components are responsive, with hover effects, and click effects (no ripple unfortunately). Fonts included. |
12 | | - |
13 | | -Screenshot in action below (chessboard not included 😛): |
14 | | - |
15 | | -## Screenshot |
16 | | - |
17 | | - |
18 | | -Other screenshot you can found [here](https://github.com/vincenzopalazzo/material-ui-swing/releases) |
19 | | - |
20 | | -# Usage |
21 | | -Go to the releases (or just the `target/classes` folder in the repo) and download the latest version of `material-ui-swing.jar`. The OSGi version is available under `target`. Add it to your project's build path (e.g. for IntelliJ [this](https://www.jetbrains.com/help/idea/import-project-from-existing-sources-libraries-page.html) might help), and you're all set! |
22 | | - |
23 | | -## Example |
24 | | - |
25 | | -````java |
26 | | -import mdlaf.*; |
27 | | -import mdlaf.animation.*; |
28 | | -import javax.swing.*; |
29 | | -import java.awt.*; |
30 | | - |
31 | | -public class MaterialUISwingDemo { |
32 | | - |
33 | | - public static void main (String[] args) { |
34 | | - try { |
35 | | - UIManager.setLookAndFeel (new MaterialLookAndFeel ()); |
36 | | - } |
37 | | - catch (UnsupportedLookAndFeelException e) { |
38 | | - e.printStackTrace (); |
39 | | - } |
40 | | - |
41 | | - JFrame frame = new JFrame ("Material Design UI for Swing by atharva washimkar"); |
42 | | - frame.setMinimumSize (new Dimension (600, 400)); |
43 | | - |
44 | | - JButton button = new JButton ("PRESS ME"); |
45 | | - button.setMaximumSize (new Dimension (200, 200)); |
46 | | - |
47 | | - JPanel content = new JPanel (); |
48 | | - content.add (button); |
49 | | - frame.add (content, BorderLayout.CENTER); |
50 | | - |
51 | | - // on hover, button will change to a light gray |
52 | | - MaterialUIMovement.add (button, MaterialColors.GRAY_100); |
53 | | - |
54 | | - frame.pack (); |
55 | | - frame.setVisible (true); |
56 | | - } |
57 | | -} |
58 | | -```` |
59 | | - |
60 | | -Check `src/main/java/MaterialUISwingDemo.java` for a slightly longer example of how to use this library (and an explanation of what everything means/does). |
61 | | -For a real-world example of usage, see [here](https://github.com/atarw/washer-chess). |
| 3 | +This application is a simple app to present material-ui-swing lib. In addition, the app is under developing (too slowly). |
62 | 4 |
|
63 | | -## Version 1.0.0 |
| 5 | +You can download the jar at this [link](https://gitlab.com/palazzovincenzo/demoswingratio/-/tree/master/bin) |
64 | 6 |
|
65 | | -This look and feel implements theming to change the color scheme of the Material UI. Currently this isn't completely stable, but if you want to implement a theme for this look and feel, you can extend and implement the abstract class `AbstractMaterialTheme` (look at `mdlaf.themes.MaterialLiteTheme` for an example). |
| 7 | +## Results |
66 | 8 |
|
67 | | -To change the theme, use the below code: |
| 9 | +After the first test with the demo Swing, I can conclude that is possible set the personal ratio at runtime with *complex* panels, like Mars use case [JMars](http://jmars.mars.asu.edu/) |
68 | 10 |
|
69 | | -``` |
70 | | - if (UIManager.getLookAndFeel() instanceof MaterialLookAndFeel){ |
71 | | - MaterialLookAndFeel.changeTheme(new MaterialDarkTheme()); |
72 | | - } |
73 | | -``` |
| 11 | +_Waiting other tests_ |
74 | 12 |
|
75 | | -A working example is also found [here](https://github.com/vincenzopalazzo/material-ui-swing/tree/masternow/src/test/java/integration/gui/mock). |
| 13 | +At the moment the image generate with the demo are: |
76 | 14 |
|
77 | | -This theming system was implemented by [@vincenzopalazzo](https://github.com/vincenzopalazzo) |
| 15 | +### 4:9 |
78 | 16 |
|
79 | | -## Stack Overflow |
| 17 | + |
80 | 18 |
|
81 | | -We don't have much time to write detailed documentation, but if you want to get help, post a question on Stack Overflow with the tags `material-ui-swing`, `java`, `material`, `swing`, `look-and-feel`. |
| 19 | +### 1:1 |
82 | 20 |
|
83 | | - ## Repository |
| 21 | + |
84 | 22 |
|
85 | | - _Maven_ |
| 23 | +### 16:9 |
86 | 24 |
|
87 | | - ``` |
88 | | -<dependency> |
89 | | - <groupId>io.github.vincenzopalazzo</groupId> |
90 | | - <artifactId>material-ui-swing</artifactId> |
91 | | - <version>1.1.1_pre-release_6.1</version> |
92 | | -</dependency> |
93 | | - ``` |
| 25 | + |
94 | 26 |
|
95 | | - _Gradle_ |
| 27 | +### Profiler |
96 | 28 |
|
97 | | -``` |
98 | | -implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1_pre-release_6.1' |
99 | | -``` |
| 29 | +You can found also the profiler snapshot YourKit[Download](https://gitlab.com/vincenzopalazzo/demoswingratio/-/raw/master/results/profiler-snapshot/RUN-2020-04-04.snapshot?inline=false) |
100 | 30 |
|
101 | | -Others version [here](https://search.maven.org/artifact/io.github.vincenzopalazzo/material-ui-swing) |
| 31 | +# TODO list |
102 | 32 |
|
103 | | -## License |
104 | | - |
| 33 | +- [X] [Create a method to generate the image from a component](https://stackoverflow.com/questions/1349220/convert-jpanel-to-image) |
| 34 | +- [X] [Create a method to load personal image inside the JPanel (like powerpoint)](https://stackoverflow.com/questions/22162398/how-to-set-a-background-picture-in-jpanel) |
105 | 35 |
|
106 | | -_**List of projects with Material-UI-Swing theme**_ |
107 | | -- [Krayon for SBGN](https://github.com/wiese42/krayon4sbgn) |
108 | | -- [JMars Beta](https://JMars.mars.asu.edu) |
| 36 | +# Sponsor |
109 | 37 |
|
110 | | -Contact us if you use this look and feel so we can add your project to the list 🙂 |
111 | | - |
112 | | -## Community |
113 | | -[](https://gitter.im/material-ui-swing/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) |
114 | | - |
115 | | -### Sponsors |
116 | | -Support this project |
| 38 | +If my work was utils to other developers, you can make a little donation at the following link (if you want :)) |
117 | 39 |
|
118 | 40 | [](https://vincenzopalazzo.github.io/material-ui-swing-donations) |
119 | | - |
120 | | - |
121 | | -_Donors_ |
122 | | -- [lilili87222](https://github.com/lilili87222) |
123 | | -- Arizona State University |
124 | | - |
125 | | -# Screenshot |
126 | | -## MaterialLiteTheme |
127 | | - |
128 | | - |
129 | | -## MaterialOceanicTheme |
130 | | - |
131 | | - |
132 | | -## JMarsDarkTheme |
133 | | - |
134 | | - |
135 | | -Other screenshot you can found [here](https://github.com/vincenzopalazzo/material-ui-swing/releases) |
136 | | - |
137 | | -## Java doc |
138 | 41 |
|
139 | | -You can consult the javadoc at [this link](https://vincenzopalazzo.github.io/material-ui-swing/) |
140 | | - |
141 | | -## Built with |
142 | | - |
143 | | -- **[jIconFont-Swing](https://jiconfont.github.io/swing)**: It is a API to provide icons generated by any IconFont. These icons can be used in Swing. |
144 | | - |
145 | | -## Performance |
146 | | - |
147 | | - |
148 | | - |
149 | | -From version 1.1.1 the material-ui-swing library will be support to YourKit and now th library will |
150 | | -start to increase the performance. |
| 42 | + |
151 | 43 |
|
152 | | -Stay tuned that the future version 1.1.1 official will be more optimize. |
| 44 | +[Github donations](https://github.com/sponsors/vincenzopalazzo?preview=true) |
153 | 45 |
|
154 | | -The YourKit is used also by Google, Microsoft, PayPal, ecc. |
| 46 | +[Liberapay](https://liberapay.com/vincenzopalazzo) |
155 | 47 |
|
156 | | -- **YourKit**: it supports open source projects with innovative and intelligent tools |
157 | | -for monitoring and profiling Java and .NET applications. |
158 | | -YourKit is the creator of <a href="https://www.yourkit.com/java/profiler/">YourKit Java Profiler</a>, |
159 | | -<a href="https://www.yourkit.com/.net/profiler/">YourKit .NET Profiler</a>, |
160 | | -and <a href="https://www.yourkit.com/youmonitor/">YourKit YouMonitor</a>. |
| 48 | +<p align="center" style="font-weight: bold;"> This demo is developed in collaborations with Arizona State University. </p> |
161 | 49 |
|
162 | | -## Dev |
| 50 | +<div align="center"> |
| 51 | +<img src="https://sundevilgymnastics.com/wp-content/uploads/2016/10/ASU-Womens-Gymnastics-Website.png" /> |
| 52 | +</div> |
163 | 53 |
|
164 | | -This is the official repository of material-ui-swing but the developing of a new feature we do in this |
165 | | -in this repository [vincenzopalazzo/material-ui-swing](https://github.com/vincenzopalazzo/material-ui-swing) and after testing |
166 | | -the official release will release in this branch. |
0 commit comments