Revision 36443 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/gui/DocumentContextMenu.java
DocumentContextMenu.java | ||
---|---|---|
57 | 57 |
|
58 | 58 |
this.item = document; |
59 | 59 |
this.seleteds = Arrays.asList(seletedDocuments); |
60 |
for (DocumentAction action : allActions) { |
|
61 |
if (action.isVisible(document, this.seleteds)) { |
|
62 |
actions.add(action); |
|
63 |
// Create menu item |
|
64 |
MenuItem item = new MenuItem(action.getTitle(), action); |
|
60 |
if (allActions != null) { |
|
61 |
for (DocumentAction action : allActions) { |
|
62 |
if (action.isVisible(document, this.seleteds)) { |
|
63 |
actions.add(action); |
|
64 |
// Create menu item |
|
65 |
MenuItem item = new MenuItem(action.getTitle(), action); |
|
65 | 66 |
|
66 |
item.setEnabled(action.isAvailable(this.item, this.seleteds)); |
|
67 |
if (!action.getGroup().equals(group)) { |
|
68 |
if (group != null) { |
|
69 |
this.addSeparator(); |
|
67 |
item.setEnabled(action |
|
68 |
.isAvailable(this.item, this.seleteds)); |
|
69 |
if (!action.getGroup().equals(group)) { |
|
70 |
if (group != null) { |
|
71 |
this.addSeparator(); |
|
72 |
} |
|
73 |
group = action.getGroup(); |
|
70 | 74 |
} |
71 |
group = action.getGroup(); |
|
75 |
this.add(item); |
|
76 |
|
|
72 | 77 |
} |
73 |
this.add(item); |
|
74 |
|
|
75 | 78 |
} |
76 | 79 |
} |
77 | 80 |
this.actions = actions; |
Also available in: Unified diff