Material-UI-Swing pre-release 6.0
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).
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.0 (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.
to paint the button with no mouse hover effect you can use this code, described in vincenzopalazzo/material-ui-swing issues.
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);
}
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);
}
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 is described inside the CHANGELOG file
To support my work in this version you can use
or