Releases: vincenzopalazzo/material-ui-swing
v1.1.1-rc3
We are happy to increase the new release candidate to version 3, this version contains minors bug fix and a now support the java9 modules.
Changelog inside 1.1.1-rc3
- Radio button icons miss
- Improve tab height in JTabbedPane whent the position is to left or right
- Java 9 Modules support
TODO list before 1.1.1
- improve buttons inside JToolBar;
- Fix next bug.
Maven
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.1-rc3</version>
</dependency>
Gradle
Groovy
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1-rc3'
Kotlin
implementation("io.github.vincenzopalazzo:material-ui-swing:1.1.1-rc3")
module name
io.github.vincenzopalazzo.materialuiswing
P.S: The maven repository should be available after 12 hours to this release
Conclusion
We want to say thanks to all developers that use this library and we want to say thanks to @metteo, @zanderson9, @Vodes that worked with us to improve the previous 1.1.1-rc2.
v1.1.1-rc2
Overview
- Introduction
- Changes
- What is new
- Conclusion
Introduction
Material-UI-Swing 1.1.1-rc2 is the last step before the official release, this release includes bug fixing, performance improvement, refactoring inside the MaterialTheming System.
In the previous month the library was supported by YourKit, with this profiling material-ui-swing has a big performance testing. (Result about profiling is coming)
Changes
This version includes bug fixing, the most important are:
- InternalFrame + TextComponent drawing issue
- Refactoring MouseHover event (Class MaterialUITime)
- Font scaling fix for high-resolution screen
- MaterialRootPaneUI resize problem
- Fix stack overflow exception inside the JSpinner. The bug is only inside the version 1.1.1-rc1 of the library.
- Added a different method to load a personal font with MaterialFontFactory.
Now the dimension font with JDK8 os calculate with display size optimizing to fix pixel bug in JDK8 but the dimension is setting static (without optimizing) with JDK version >=9. - Fixed rollover border on JToolBar.
- Refactoring JComboBox, now is possible to change the arch of the bord easy.
- Apply anti-aliasing to some component
- Support JDK9+
- Material arrow to JTabbedPanel with scrolling policy
- Support Font icon and deprecated PNG icon
- Refactoring Material theming, now you can implement only the method install color and if necessary other personal settings, you can use the new method, installColodDefaults(), look the source code here, jump into source code
What is new
There is a good change inside the library with the icon, the library use jiconfont to support the google material icons.
With this is possible to build a new icon with personal dimension and color, For example
JButton button = new JButton();
button.setIcon(MaterialImageFactory.getInstance().getImage(
GoogleMaterialDesignIcons.ADD_A_PHOTO,
MaterialColors.COSMO_BLACK)
);
The result is
Other screenshots
Conclusion
Before all, I want say thanks all to all people that use this library and I want to say thanks to all developers that help me to improve the library in this 2020.
Thanks to, @mikera, @jarek-insys, @zanderson9
In conclusion, I want to share with you the maven data
Stay safe and materialize you swing app :)
Material-UI-Swing-1.1.1-rc1
Material-ui-swing 1.1.1 release candidate 1 has been released.
Other information here CHANGELOG.md
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
Special thanks
I want say thanks to all person have contributed with an issue or a talk on my reddit post for building and increase this pre-release version of this library.
material-ui-swing 1.1.1 official is coming
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
- #83
- #87
- #88
- atarw/material-ui-swing#90
- atarw/material-ui-swing#88
- atarw/material-ui-swing#87
- atarw/material-ui-swing#85
New label
I have created the new label to create a little documentation to material-ui-swing, you can see the label doc
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 oracle 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:
JMarsDark theme
know Bug
Demo
The demo is update, you can play with it, but have the partial support to the Material theme.
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
v1.1.0-beta
Released Version 1.1.0 beta.
Bug Fixed
- #83
- #87
- #88
- atarw/material-ui-swing#90
- atarw/material-ui-swing#88
- atarw/material-ui-swing#87
- atarw/material-ui-swing#85
New label
I have created the new label to create a little documentation to material-ui-swing, you can see the label doc
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 oracle docuementation
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:
JMarsDark theme
know Bug
Demo
The demo is update, you can play with it, but have the partial support to the Material thme.
Conclusion
This version is more stable and more optimized.
If you like my work, I will happy if you buy me the Chrismas Films also you can see the my Github donator site
V1.0.6
The version 1.0.6 has this fix:
The change in this minor version are:
- Fixed this issue #84
- Is possible to use this constant to change the default setting to UIManager.
table.put("Menu.arrowIcon", theme.getMenuArrowIcon());
table.put("Menu[arrowIcon].hoverColor", theme.getMenuArrowHoverColor());
table.put("Menu[arrowIcon].color", theme.getMenuTextColor());
table.put("Menu[arrowIcon].height", theme.getMenuArrowHeight());
table.put("Menu[arrowIcon].width", theme.getMenuArrowWidth());
Or is possibly used the MaterialThemingSystem.
- Fixed the regression inside the MaterialComponentField
V1.0.3
This release fixed this bug
Also, this version will disponible on maven repository, look the readme
V1.0.2
V1.0.Beta1.4.2
This version introduced the new Style of the JTabbedPane.
Look this scree
So this versions and the others laters have the official repo maven on the https://search.maven.org/
Maven
<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.0-Beta-1.4.2</version>
</dependency>
Gradle
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.0-Beta-1.4.2'
Other instruction here