- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
for (JButton button : buttons) {
if(buttons.length>0&&button==buttons[0]){
if (canCreate()||button.getName().equals(BTN_EDIT_CONTRACT)) {
UiUtils.setEnabled(button, true, canCreate()|| button.getName().equals(BTN_EDIT_CONTRACT));
} else {
UiUtils.setEnabled(button, false, canCreate()|| button.getName().equals(BTN_EDIT_CONTRACT));
}
}
if(buttons.length>1&&button==buttons[1]){
if (canEdit()||canView()||button.getName().equals(BTN_EDIT_CONTRACT)) {
UiUtils.setEnabled(button, true, canEdit()||canView()|| button.getName().equals(BTN_EDIT_CONTRACT));
} else {
UiUtils.setEnabled(button, false, canEdit()||canView() || button.getName().equals(BTN_EDIT_CONTRACT));
}
}
if(buttons.length>2&&button==buttons[2]){
if (canDelete()||button.getName().equals(BTN_EDIT_CONTRACT)) {
UiUtils.setEnabled(button, true, canDelete()|| button.getName().equals(BTN_EDIT_CONTRACT));
} else {
UiUtils.setEnabled(button, false, canDelete() || button.getName().equals(BTN_EDIT_CONTRACT));
}
}
if(buttons.length>3&&button==buttons[3]){
if (canEdit()||canView()||button.getName().equals(BTN_EDIT_CONTRACT)) {
UiUtils.setEnabled(button, true, canEdit()||canView()|| button.getName().equals(BTN_EDIT_CONTRACT));
} else {
UiUtils.setEnabled(button, false, canEdit()||canView() || button.getName().equals(BTN_EDIT_CONTRACT));
}
}
if(buttons.length>4&&button==buttons[4]){
if (canEdit()||canView()||button.getName().equals(BTN_EDIT_CONTRACT)) {
UiUtils.setEnabled(button, true, canEdit()||canView()|| button.getName().equals(BTN_EDIT_CONTRACT));
} else {
UiUtils.setEnabled(button, false, canEdit()||canView() || button.getName().equals(BTN_EDIT_CONTRACT));
}
}
}
Lure Of Chaos 15.07.2010 15:52 # −1
WebKill_HochetVBan 15.07.2010 20:00 # 0
Lure Of Chaos 15.07.2010 20:05 # +1