BrightSide Workbench Full Report + Source Code
DialogButton.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
package
org.turro.zkoss.dialog;
19
20
import
java.util.EnumSet;
21
import
java.util.Set;
22
import
org.turro.i18n.I_;
23
import
org.zkoss.zul.Button;
24
29
public
enum
DialogButton
{
30
31
BUTTON_OK
(
"/_zul/images/ok.png"
,
"Ok"
),
32
BUTTON_CANCEL
(
"/_zul/images/cancel.png"
,
"Cancel"
),
33
BUTTON_CLOSE
(
"/_zul/images/close.png"
,
"Close"
);
34
35
private
String image,
label
;
36
37
private
DialogButton
(String image, String label) {
38
this.image = image;
39
this.label = label;
40
}
41
42
public
String
getImage
() {
43
return
image;
44
}
45
46
public
String
getLabel
() {
47
return
label;
48
}
49
50
public
Button
getButton
() {
51
Button button =
new
Button(
I_
.
get
(label));
52
if
(image !=
null
) {
53
button.setImage(image);
54
}
55
return
button;
56
}
57
58
public
static
Set<DialogButton>
getOkCancelButtons
() {
59
return
EnumSet.of(BUTTON_OK, BUTTON_CANCEL);
60
}
61
62
public
static
Set<DialogButton>
getCloseButtons
() {
63
return
EnumSet.of(BUTTON_CLOSE);
64
}
65
66
}
org.turro.i18n.I_
Definition:
I_.java:39
org.turro.i18n.I_.get
static String get(String msg)
Definition:
I_.java:41
org.turro.zkoss.dialog.DialogButton
Definition:
DialogButton.java:29
org.turro.zkoss.dialog.DialogButton.getCloseButtons
static Set< DialogButton > getCloseButtons()
Definition:
DialogButton.java:62
org.turro.zkoss.dialog.DialogButton.BUTTON_CANCEL
BUTTON_CANCEL
Definition:
DialogButton.java:32
org.turro.zkoss.dialog.DialogButton.getOkCancelButtons
static Set< DialogButton > getOkCancelButtons()
Definition:
DialogButton.java:58
org.turro.zkoss.dialog.DialogButton.BUTTON_CLOSE
BUTTON_CLOSE
Definition:
DialogButton.java:33
org.turro.zkoss.dialog.DialogButton.label
String label
Definition:
DialogButton.java:35
org.turro.zkoss.dialog.DialogButton.getLabel
String getLabel()
Definition:
DialogButton.java:46
org.turro.zkoss.dialog.DialogButton.BUTTON_OK
BUTTON_OK
Definition:
DialogButton.java:31
org.turro.zkoss.dialog.DialogButton.getButton
Button getButton()
Definition:
DialogButton.java:50
org.turro.zkoss.dialog.DialogButton.getImage
String getImage()
Definition:
DialogButton.java:42
TurroProjects
Public
BrightSide
elephant-zkoss
src
main
java
org
turro
zkoss
dialog
DialogButton.java
Generated on Tue Mar 12 2024 07:01:18 for BrightSide by
1.9.1