11package com .notification .types ;
22
33import java .awt .BorderLayout ;
4+ import java .awt .Color ;
45import java .awt .Dimension ;
56import java .awt .event .ActionEvent ;
67import java .awt .event .ActionListener ;
78
89import javax .swing .JButton ;
910import javax .swing .JPanel ;
1011
11- import com .theme .TextTheme ;
1212import com .theme .WindowTheme ;
1313
1414/**
@@ -58,7 +58,7 @@ public void actionPerformed(ActionEvent e) {
5858 /**
5959 * Will wait for the user to click a button (if the Notification hides, this method will act as if the user clicked
6060 * deny).
61- *
61+ *
6262 * @return the user's response
6363 */
6464 public boolean blockUntilReply () {
@@ -73,7 +73,7 @@ public boolean blockUntilReply() {
7373
7474 /**
7575 * Sets the preferred size of the buttons.
76- *
76+ *
7777 * @param d
7878 */
7979 public void setButtonDimensions (Dimension d ) {
@@ -90,7 +90,7 @@ public String getAcceptText() {
9090
9191 /**
9292 * Sets the text on the accept button.
93- *
93+ *
9494 * @param acceptText
9595 */
9696 public void setAcceptText (String acceptText ) {
@@ -106,7 +106,7 @@ public String getDeclineText() {
106106
107107 /**
108108 * Sets the text on the decline button.
109- *
109+ *
110110 * @param declineText
111111 */
112112 public void setDeclineText (String declineText ) {
@@ -127,21 +127,13 @@ public void hide() {
127127 }
128128 }
129129
130- @ Override
131- public void setTextTheme (TextTheme theme ) {
132- super .setTextTheme (theme );
133-
134- m_accept .setForeground (theme .subtitleColor );
135- m_decline .setForeground (theme .subtitleColor );
136- }
137-
138130 @ Override
139131 public void setWindowTheme (WindowTheme theme ) {
140132 super .setWindowTheme (theme );
141133
142- if ( getTextTheme () != null ) {
143- m_accept . setForeground ( getTextTheme (). subtitleColor );
144- m_decline .setForeground (getTextTheme (). subtitleColor );
145- }
134+ // override any color setting done automatically by the WindowTheme
135+ // since black is the only color that looks good on buttons
136+ m_accept .setForeground (Color . black );
137+ m_decline . setForeground ( Color . black );
146138 }
147139}
0 commit comments