Skip to content

Commit d9206ba

Browse files
Merge pull request #182 from vincenzopalazzo/development
code rafactoring and small bug fixes
2 parents bdd26ee + 17f3490 commit d9206ba

File tree

7 files changed

+55
-55
lines changed

7 files changed

+55
-55
lines changed

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# v1.1.3-rc1
2+
3+
## General
4+
- Merge pull request #177 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/bdd26eef3d34cc50c3dc53772f2e49bcc71f1445)). @vincenzopalazzo 26-03-2022
5+
- fixed bug in the resize windows ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/93354a50c6eb973db53e6bc9e0fcec2fa08cd9ec)). @vincenzopalazzo 18-02-2022
6+
- Merge pull request #176 from nmarulo/github-actions-build-on-pull-req… ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/7001db62199efafd3c5c128f0653bd32f13ceaaa)). @vincenzopalazzo 03-10-2021
7+
- Add Github actions event to all PR ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/24f424d7c3f28c5ecc9db1fe2fab51689c773103)). @nmarulo 03-10-2021
8+
- Merge pull request #175 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/bb4b568800a6aee9d6f1943f15c3f75e44d4721f)). @vincenzopalazzo 02-10-2021
9+
- fixed formatting code ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/02e86eb02fa397fe28f867f26e35ffed535e7996)). @vincenzopalazzo 02-10-2021
10+
- Merge pull request #173 from francescofact/master ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/37bf10b61bb2988bea7e9f81e5287eca10a51f0f)). @vincenzopalazzo 02-10-2021
11+
- removed "fixed" ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/a164e06a7cc3993de4c278936bcd4d373abe9786)). @francescofact 02-10-2021
12+
- updated PS ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/d51ee762e5fc62980a665f1a10fe2ab8d2e968bc)). @francescofact 02-10-2021
13+
- Merge pull request #172 from berry120/master ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/c355cf968d2d791ae0a78c3ac63b2abe9dafffdf)). @vincenzopalazzo 02-10-2021
14+
- Remove redundant comment ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/51315789f7238c62aa230dd2bab13ee9e5f53280)). @berry120 02-10-2021
15+
- Fix typos and plurals ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/fdb4573085372e93a1fbd0d8e9505f329b713837)). @francescofact 02-10-2021
16+
- Fix typos ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/8fda7ea73469a1f6255f35bd63487ed0856e464e)). @berry120 01-10-2021
17+
- Merge pull request #170 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/5581451788706f692e5efa624a9e4e6c8635ffbc)). @vincenzopalazzo 01-10-2021
18+
- adding contribution rules ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/195eefdc5a5b91d30fb2073e2887a12bb4e1f0cd)). @vincenzopalazzo 01-10-2021
19+
- Release version v1.1.2 ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/e6ca0b89771c2ec99d2afb9af4cf00af373a08af)). @vincenzopalazzo 11-06-2021

changelog.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"package_name": "material-ui-swing",
3+
"version": "v1.1.3-rc1",
4+
"api": {
5+
"name": "github",
6+
"repository": "vincenzopalazzo/material-ui-swing",
7+
"branch": "master"
8+
},
9+
"generation_method": {
10+
"name": "metadata",
11+
"header_filter": false
12+
},
13+
"serialization_method": {
14+
"name": "md"
15+
}
16+
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GROUP_ID=io.github.vincenzopalazzo
22
ARTIFACT_ID=material-ui-swing
33
#VERSION=1.1.2-rc2-SNAPSHOT
4-
VERSION=1.1.2
4+
VERSION=1.1.3-rc1-SNAPSHOT
55
MODULE_NAME=io.github.vincenzopalazzo.materialuiswing
66
RELEASE_ENABLE=true
77

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>io.github.vincenzopalazzo</groupId>
66
<artifactId>material-ui-swing</artifactId>
7-
<version>1.1.2</version>
7+
<version>1.1.3-rc1-SNAPSHOT</version>
88
<inceptionYear>2020</inceptionYear>
99
<licenses>
1010
<license>

src/main/java/mdlaf/components/button/MaterialButtonsComponentsUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public class MaterialButtonsComponentsUI extends MaterialButtonUI {
4040

4141
@Override
4242
public void installUI(JComponent c) {
43-
borderEnabled = false;
4443
mouseHoverEnabled = false;
4544
super.installUI(c);
45+
borderEnabled = false;
4646
buttonBorderToAll = false;
4747
}
4848

src/main/java/mdlaf/components/titlepane/MaterialTitlePaneUI.java

+14-50
Original file line numberDiff line numberDiff line change
@@ -171,53 +171,9 @@ protected void initMaterialButtonClose() {
171171
}
172172

173173
protected void determineColors() {
174-
switch (getWindowDecorationStyle()) {
175-
case JRootPane.FRAME:
176-
myActiveBackground = UIManager.getColor("Material.activeCaption");
177-
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
178-
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
179-
break;
180-
case JRootPane.ERROR_DIALOG:
181-
myActiveBackground = UIManager.getColor("OptionPane.errorDialog.titlePane.background");
182-
myActiveForeground = UIManager.getColor("OptionPane.errorDialog.titlePane.foreground");
183-
myActiveShadow = UIManager.getColor("OptionPane.errorDialog.titlePane.shadow");
184-
break;
185-
case JRootPane.QUESTION_DIALOG:
186-
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
187-
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
188-
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
189-
break;
190-
case JRootPane.COLOR_CHOOSER_DIALOG:
191-
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
192-
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
193-
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
194-
break;
195-
case JRootPane.FILE_CHOOSER_DIALOG:
196-
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
197-
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
198-
myActiveShadow = myActiveBackground;
199-
break;
200-
case JRootPane.WARNING_DIALOG:
201-
myActiveBackground = UIManager.getColor("OptionPane.warningDialog.titlePane.background");
202-
myActiveForeground = UIManager.getColor("OptionPane.warningDialog.titlePane.foreground");
203-
myActiveShadow = UIManager.getColor("OptionPane.warningDialog.titlePane.shadow");
204-
break;
205-
case JRootPane.PLAIN_DIALOG:
206-
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
207-
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
208-
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
209-
break;
210-
case JRootPane.INFORMATION_DIALOG:
211-
myActiveBackground = UIManager.getColor("OptionPane.errorDialog.titlePane.background");
212-
myActiveForeground = UIManager.getColor("OptionPane.errorDialog.titlePane.foreground");
213-
myActiveShadow = UIManager.getColor("OptionPane.errorDialog.titlePane.shadow");
214-
break;
215-
default:
216-
myActiveBackground = UIManager.getColor("Material.activeCaption");
217-
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
218-
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
219-
break;
220-
}
174+
myActiveBackground = UIManager.getColor("Material.activeCaption");
175+
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
176+
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
221177
}
222178

223179
protected void installDefaults() {
@@ -340,11 +296,11 @@ protected LayoutManager createLayout() {
340296
}
341297

342298
protected void setActive(boolean active) {
343-
myCloseButton.putClientProperty("paintActive", Boolean.valueOf(active));
299+
myCloseButton.putClientProperty("paintActive", active);
344300

345301
if (getWindowDecorationStyle() == JRootPane.FRAME) {
346-
myIconifyButton.putClientProperty("paintActive", Boolean.valueOf(active));
347-
myToggleButton.putClientProperty("paintActive", Boolean.valueOf(active));
302+
myIconifyButton.putClientProperty("paintActive", active);
303+
myToggleButton.putClientProperty("paintActive", active);
348304
}
349305

350306
getRootPane().repaint();
@@ -734,6 +690,11 @@ protected void init(String text, Icon icon) {
734690
setUI(new JButtonNoMouseHoverUI());
735691
}
736692

693+
@Override
694+
public void updateUI() {
695+
setUI(new JButtonNoMouseHoverUI());
696+
}
697+
737698
private static class JButtonNoMouseHoverUI extends MaterialButtonsComponentsUI {
738699

739700
@Override
@@ -747,6 +708,9 @@ protected void paintButtonPressed(Graphics g, AbstractButton b) {
747708
// doNothing
748709
}
749710

711+
@Override
712+
protected void paintBorderButton(Graphics graphics, JComponent b) {}
713+
750714
@Override
751715
protected void paintFocus(
752716
Graphics g,

src/test/java/integration/gui/mock/DemoGUITest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ public class DemoGUITest extends JFrame {
5252
static {
5353
try {
5454
JDialog.setDefaultLookAndFeelDecorated(true);
55-
JFrame.setDefaultLookAndFeelDecorated(true); // not support yet
55+
// FIXME: finish support for the JFrame.setDefaultLookAndFeelDecorated
56+
JFrame.setDefaultLookAndFeelDecorated(true);
5657
UIManager.setLookAndFeel(new MaterialLookAndFeel(new MaterialLiteTheme()));
5758
// UIManager.setLookAndFeel(new MaterialLookAndFeel(new DarkStackOverflowTheme()));
5859
UIManager.put(
5960
"Button.mouseHoverEnable",
60-
true); // Because the test are more difficulte with effect mouse hover
61+
true); // Because the test are more difficult with effect mouse hover
6162
} catch (UnsupportedLookAndFeelException e) {
6263
e.printStackTrace();
6364
}

0 commit comments

Comments
 (0)