Releases: atarw/material-ui-swing
v1.1.2
One month late, we are happy to announce version 1.1.2 that close the our big Milestone Material-UI-Swing 1.1.2.
This version includes the following changes
- Bug Fixing in the Material UI Theme
- Small bug fixing in the repository code (Removed dead code)
- Removing deprecated API
- Introduce the Java linter under the Google Code Style
- Improve Github Actions
- Support Themes under the material-theme palette look the screenshot in the Wiki
Ask question about the release, join to the discussion at the following link vincenzopalazzo/material-ui-swing#166
New Material themes
MaterialLiteTheme
See also here
MaterialOceanicTheme
See also here
P.S: Sorry if we break your App with the new theme but these are really cool 💯 .
Join in the new Github discussion to give us feedback and ideas
Maven
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.2</version>
</dependency>
Gradle
Groovy
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.2'
Kotlin
implementation("io.github.vincenzopalazzo:material-ui-swing:1.1.2")
Java9 module name
io.github.vincenzopalazzo.materialuiswing
Support
If you like the library and want to support it, please considerer to donate with the following system
v1.1.2-rc1
Hotfix
This release is a hotfix to fix the casting bug described below:
- Fixed issue 150
- Support Table.border described here
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.2-rc1</version>
</dependency>
Gradle
Groovy
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.2-rc1'
Kotlin
implementation("io.github.vincenzopalazzo:material-ui-swing:1.1.2-rc1")
Java9 module name
io.github.vincenzopalazzo.materialuiswing
Support
If you like the library and want support it, please considerer to donate with the following system
v1.1.1: Gotham
Introduction
I am happy to annunce the Material-UI-Swing library 1.1.1, after a very long incubation period, around 9 months. This version of the library imported a complete support of the material style for the swing components and also support the java9 modules.
In addition, we are entuasiate to annunce that the library was used inside a very big and important project in the Java world (Included inside the best 25 java apps described here) called JMars. In fact JMars is a geospatial information system (GIS) used to study the data built from the most important space missions, like Mars 2020 developed by Nasa and Hope developed by United Arab Emirates (UAE).
JMars description
JMARS is an acronym that stands for Java Mission-planning and Analysis for Remote Sensing. It is a geospatial information system (GIS) developed by ASU's Mars Space Flight Facility to provide mission planning and data-analysis tools to NASA scientists, instrument team members, students of all ages and the general public. JMARS has been available to the public since 2003. It is used in over 65 countries and has over 6,000 active users.
Also, Arizona State University is a founder/supporter with donations. In fact, ASU contribute to make possible the work on this library such as a open source library open for all people. Thanks to do this.
Material-UI-Swing 1.1.1
After a short summary with the a shor description of people that are helping me to develop this open source library. I want introduce the news inside the library, and they are a few.
Before all, all stable versions of the library will bring a name in addition to the version number.
This version will be call Gotham and the mascotte of this version is Bane.
The news inside the library are:
- New icons insie the project, in fact the library implementa a customizzation of JIconFont that support the last version of Google Material Icons
- Removed all undecessary images with png format inside the library, in relation of these changes the class MaterialImagesFactory change a little the API, look the javadoc here for more information
- MaterialTheme change the status from alpha version to beta version, now you can develope a new theme like a new jar and you can include it inside your java app
- All status inside the component are supported, some components syule below
- New theme for the library, called DarkStackOverflowTheme
- A couple of new components, such as SwingSnackBar and JTextFieldPlaceholder
- Bugs fixing inside the Component style
- Refactoring MaterialTheme, now is possible write a theme with a few line of code
- Performance improvment, the MaterialButonUI API was rewriting from the version v1.1.1-prelease6.1
- material-ui-swing umbrella
- New Demo
- new Wiki
Maven Repository
Maven
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.1</version>
</dependency>
Gradle
Groovy
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1'
Kotlin
implementation("io.github.vincenzopalazzo:material-ui-swing:1.1.1")
Java9 module name
io.github.vincenzopalazzo.materialuiswing
Real use cases
- How JMars application look like with Material-UI-Swing
- How ArgoUML look like (support material lib in argo UML are coming soon, look the status here)
Special thanks
Before all, I want to say thanks to all people that help me to improve the library and to make the version 1.1.1, so thanks @zanderson9, @metteo, @jarek-insys, @mikera
Also, I want to say thank all people that are using and testing the library.
Support
If you like the library and want support it, please considerer to donate with the following system
v1.1.1-prelease6.1
Material-UI-Swing pre-release 6.1
Introduction
This version includes the complete refactoring to JButton and restored all change inside the JTable (the code of the table UI is equal to code the version 1.1.1_beta material-ui-swing version).
MaterialButtonUI Refactoring
The old version of MaterialButtonUI had a bad code inside the implementation and this caused the bad performance with a complex client application, how JMars, an example mouse hover event on Jbutton worked bad or ware very slow.
The version 1.1.1 pre-release 6.1 (over to have an ugly name 😄) introduce a big refactoring inside the component UI, and change/simplifies the API of JButton if you want to create a personal UI.
as well as to disabled the mouse hovers on the Jbutton, you can disable the focus (borders dashed) and the button pressed effect.
With order.
Disabled mouse hover with personalUI
to paint the button with no mouse hover effect you can use this code, described in vincenzopalazzo/material-ui-swing issues.
Disabled borders dashed
to disabled border dashed there are two possible methods, like:
- set the button not focusable or with button.setFocusable(false);
- create a personal implementation of the method paintFoucs, like the following code
@Override
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) {
paintBorderButton(g, b);
}
Disable button pressed effect
To disabled button pressed effect you can override inside the personal UI component the method called paintButtonPressed with code like the following:
@Override
protected void paintButtonPressed(Graphics g, AbstractButton b) {
g.setColor(background);
g.fillRoundRect(0, 0, b.getWidth(), b.getHeight(), arch, arch);
paintBorderButton(g, b);
}
Refactoring JTable
In the material-ui-swing 1.1.1 pre-release6.1 include refactoring to JTable, before this update the proprieties inside UIDefault was:
UIManager.put("Table.alternateRowColor", true);
UiManager.put("Table.alternateRowBackground", Color.RED);
and inside the MaterialTableCellRenderer the code was:
public class MaterialTableCellRenderer extends DefaultTableCellRenderer {
@Override
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
JComponent component = (JComponent) super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column);
// hides yellow selection highlight
this.setHorizontalAlignment (SwingConstants.CENTER);
this.setVerticalAlignment (SwingConstants.CENTER);
if(value instanceof Boolean){
TableCellRenderer renderer = new MaterialTableCellRendererCheckBox();
return renderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
}
boolean alternativeRow = UIManager.getBoolean("Table.alternateRowColor");
Color alternativeRowColor = UIManager.getColor("Table.alternateRowBackground");
Color normalColor = UIManager.getColor("Table.background");
if(alternativeRow){
if(!isSelected){
if(row%2 == 1) {
component.setBackground(alternativeRowColor);
setDefaultCellRenderWithAllType(table, value, isSelected, hasFocus, row, column, alternativeRowColor);
}else{
component.setBackground(normalColor);
setDefaultCellRenderWithAllType(table, value, isSelected, hasFocus, row, column, normalColor);
}
component.setForeground(table.getForeground());
}else {
component.setForeground(table.getSelectionForeground());
}
}
return component;
}
// This method sets a MaterialCellRender at the particular class
// With this class not working correctly the color alternate in the Jtable
// in particular the IconImage without this code the cell is painted not correctly or
// in the cell did print the path of the image
protected void setDefaultCellRenderWithAllType(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column, Color color) {
if(table == null){
throw new IllegalArgumentException("Table is null");
}
Component component = table.getDefaultRenderer(ImageIcon.class).getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
component.setBackground(color);
}
}
Now the code is refactorized and the UIManager proprieties are changed in
table.put("Table.alternateRowColor", Color.RED);
Now the paint row is managed to DefaultTableCellRenderer and if you create the PersonalTableCellRenderer, you can extend the API class (DefaultTableCellRenderer) and not MaterialTableCellRenderer
Conclusion
Now the implementation of JButton is a lot of personalizable but it is possible to increase the modularization of the component MaterialButtonUI.
For the moment the version remains this because another refactoring can introduce a few bugs inside the component behavior
Other changes are described inside the CHANGELOG file
Document License
Sponsors this work
To support my work in this version you can use
or
"Santa Claus lives in area 51"
🎅 Material-UI-Swing 🎄
- Version: 1.1.1-beta
- Name: "Santa Claus lives in area 51"
Release notes
Bug Fixed
- vincenzopalazzo/material-ui-swing#83
- vincenzopalazzo/material-ui-swing#87
- vincenzopalazzo/material-ui-swing#88
- #90
- #88
- #87
- #85
- #92
- #89
New label
I have created the new label to create a little documentation to material-ui-swing, you can see the label doc and here
New feature
- Partial support to the
JFrame.setDefaultLookAndFeelDecorated(true);
- Introduction partial support to the new style of the MaterialTabbedPane (Sperimental version)
- New theme dark called JMarsDark, ispirated to JMars Beta version, you can find it here
With MaterialTabbedPane is possible now enable the scrollabe view, for some detail , you can look docuementation
This is the result
But exist an bug, look the bug 1 in the know bug
Without the scrollable view you can have the angular material effect when the is setter JTabbledPane.TOP, this is the result
Without the JTabbledPane.TOP, so JTabbledPane.LEAF, ecc you have the old version style, like this:
JMarsDarkTheme
know Bug
Demo
The demo is update, you can play with it, but have the partial support to the Material theme.
Repository
Maven
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.1_beta</version>
</dependency>
Gradle
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1_beta'
Others version here
Conclusion
This version is more stable and more optimized.
If you like my work, I will happy if you buy me the christmas movie or you can see the my Github donator site
Merry Christmast 🎅 🎄
v0.9.6: Merge pull request #82 from vincenzopalazzo/workingonversion1.0
Updating releases to catch up with the latest master
v0.9.4.0: Merge pull request #76 from vincenzopalazzo/fixsomeissue
Haven't updated this in a while oops
v0.9.3.5: Merge pull request #56 from vincenzopalazzo/fix#55
Small bug with JTextFields is no more