Skip to content

Commit

Permalink
Merge pull request #182 from vincenzopalazzo/development
Browse files Browse the repository at this point in the history
code rafactoring and small bug fixes
  • Loading branch information
vincenzopalazzo authored Apr 4, 2022
2 parents bdd26ee + 17f3490 commit d9206ba
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 55 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# v1.1.3-rc1

## General
- Merge pull request #177 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/bdd26eef3d34cc50c3dc53772f2e49bcc71f1445)). @vincenzopalazzo 26-03-2022
- fixed bug in the resize windows ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/93354a50c6eb973db53e6bc9e0fcec2fa08cd9ec)). @vincenzopalazzo 18-02-2022
- 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
- Add Github actions event to all PR ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/24f424d7c3f28c5ecc9db1fe2fab51689c773103)). @nmarulo 03-10-2021
- Merge pull request #175 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/bb4b568800a6aee9d6f1943f15c3f75e44d4721f)). @vincenzopalazzo 02-10-2021
- fixed formatting code ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/02e86eb02fa397fe28f867f26e35ffed535e7996)). @vincenzopalazzo 02-10-2021
- Merge pull request #173 from francescofact/master ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/37bf10b61bb2988bea7e9f81e5287eca10a51f0f)). @vincenzopalazzo 02-10-2021
- removed "fixed" ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/a164e06a7cc3993de4c278936bcd4d373abe9786)). @francescofact 02-10-2021
- updated PS ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/d51ee762e5fc62980a665f1a10fe2ab8d2e968bc)). @francescofact 02-10-2021
- Merge pull request #172 from berry120/master ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/c355cf968d2d791ae0a78c3ac63b2abe9dafffdf)). @vincenzopalazzo 02-10-2021
- Remove redundant comment ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/51315789f7238c62aa230dd2bab13ee9e5f53280)). @berry120 02-10-2021
- Fix typos and plurals ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/fdb4573085372e93a1fbd0d8e9505f329b713837)). @francescofact 02-10-2021
- Fix typos ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/8fda7ea73469a1f6255f35bd63487ed0856e464e)). @berry120 01-10-2021
- Merge pull request #170 from vincenzopalazzo/development ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/5581451788706f692e5efa624a9e4e6c8635ffbc)). @vincenzopalazzo 01-10-2021
- adding contribution rules ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/195eefdc5a5b91d30fb2073e2887a12bb4e1f0cd)). @vincenzopalazzo 01-10-2021
- Release version v1.1.2 ([commit](https://github.com/vincenzopalazzo/material-ui-swing/commit/e6ca0b89771c2ec99d2afb9af4cf00af373a08af)). @vincenzopalazzo 11-06-2021
16 changes: 16 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"package_name": "material-ui-swing",
"version": "v1.1.3-rc1",
"api": {
"name": "github",
"repository": "vincenzopalazzo/material-ui-swing",
"branch": "master"
},
"generation_method": {
"name": "metadata",
"header_filter": false
},
"serialization_method": {
"name": "md"
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GROUP_ID=io.github.vincenzopalazzo
ARTIFACT_ID=material-ui-swing
#VERSION=1.1.2-rc2-SNAPSHOT
VERSION=1.1.2
VERSION=1.1.3-rc1-SNAPSHOT
MODULE_NAME=io.github.vincenzopalazzo.materialuiswing
RELEASE_ENABLE=true

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.2</version>
<version>1.1.3-rc1-SNAPSHOT</version>
<inceptionYear>2020</inceptionYear>
<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public class MaterialButtonsComponentsUI extends MaterialButtonUI {

@Override
public void installUI(JComponent c) {
borderEnabled = false;
mouseHoverEnabled = false;
super.installUI(c);
borderEnabled = false;
buttonBorderToAll = false;
}

Expand Down
64 changes: 14 additions & 50 deletions src/main/java/mdlaf/components/titlepane/MaterialTitlePaneUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,53 +171,9 @@ protected void initMaterialButtonClose() {
}

protected void determineColors() {
switch (getWindowDecorationStyle()) {
case JRootPane.FRAME:
myActiveBackground = UIManager.getColor("Material.activeCaption");
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
break;
case JRootPane.ERROR_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.errorDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.errorDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.errorDialog.titlePane.shadow");
break;
case JRootPane.QUESTION_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
break;
case JRootPane.COLOR_CHOOSER_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
break;
case JRootPane.FILE_CHOOSER_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
myActiveShadow = myActiveBackground;
break;
case JRootPane.WARNING_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.warningDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.warningDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.warningDialog.titlePane.shadow");
break;
case JRootPane.PLAIN_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.questionDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.questionDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.questionDialog.titlePane.shadow");
break;
case JRootPane.INFORMATION_DIALOG:
myActiveBackground = UIManager.getColor("OptionPane.errorDialog.titlePane.background");
myActiveForeground = UIManager.getColor("OptionPane.errorDialog.titlePane.foreground");
myActiveShadow = UIManager.getColor("OptionPane.errorDialog.titlePane.shadow");
break;
default:
myActiveBackground = UIManager.getColor("Material.activeCaption");
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
break;
}
myActiveBackground = UIManager.getColor("Material.activeCaption");
myActiveForeground = UIManager.getColor("Material.activeCaptionText");
myActiveShadow = UIManager.getColor("Material.activeCaptionBorder");
}

protected void installDefaults() {
Expand Down Expand Up @@ -340,11 +296,11 @@ protected LayoutManager createLayout() {
}

protected void setActive(boolean active) {
myCloseButton.putClientProperty("paintActive", Boolean.valueOf(active));
myCloseButton.putClientProperty("paintActive", active);

if (getWindowDecorationStyle() == JRootPane.FRAME) {
myIconifyButton.putClientProperty("paintActive", Boolean.valueOf(active));
myToggleButton.putClientProperty("paintActive", Boolean.valueOf(active));
myIconifyButton.putClientProperty("paintActive", active);
myToggleButton.putClientProperty("paintActive", active);
}

getRootPane().repaint();
Expand Down Expand Up @@ -734,6 +690,11 @@ protected void init(String text, Icon icon) {
setUI(new JButtonNoMouseHoverUI());
}

@Override
public void updateUI() {
setUI(new JButtonNoMouseHoverUI());
}

private static class JButtonNoMouseHoverUI extends MaterialButtonsComponentsUI {

@Override
Expand All @@ -747,6 +708,9 @@ protected void paintButtonPressed(Graphics g, AbstractButton b) {
// doNothing
}

@Override
protected void paintBorderButton(Graphics graphics, JComponent b) {}

@Override
protected void paintFocus(
Graphics g,
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/integration/gui/mock/DemoGUITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ public class DemoGUITest extends JFrame {
static {
try {
JDialog.setDefaultLookAndFeelDecorated(true);
JFrame.setDefaultLookAndFeelDecorated(true); // not support yet
// FIXME: finish support for the JFrame.setDefaultLookAndFeelDecorated
JFrame.setDefaultLookAndFeelDecorated(true);
UIManager.setLookAndFeel(new MaterialLookAndFeel(new MaterialLiteTheme()));
// UIManager.setLookAndFeel(new MaterialLookAndFeel(new DarkStackOverflowTheme()));
UIManager.put(
"Button.mouseHoverEnable",
true); // Because the test are more difficulte with effect mouse hover
true); // Because the test are more difficult with effect mouse hover
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit d9206ba

Please sign in to comment.