Skip to content

Commit

Permalink
Close #180
Browse files Browse the repository at this point in the history
  • Loading branch information
Open Lowcode SAS committed Jul 5, 2020
1 parent 5482c53 commit 36d4f9a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/org/openlowcode/client/graphic/widget/CMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class CMenu {
private String label;
private ArrayList<CMenuItem> listofitems;
private String icon;
private static HashMap<String,ImageView> imagesperpath = new HashMap<String,ImageView>();

/**
* create a menu from a message from the server
Expand Down Expand Up @@ -71,16 +70,15 @@ public CMenu(MessageReader reader, CPageSignifPath parentpath) throws OLcRemoteE
*/
public Menu getMenu(PageActionManager actionmanager, CPageData inputdata, Window parentwindow) {
Menu menu = new Menu(label);
if (icon!=null) if (icon.length()>0) {
ImageView image = imagesperpath.get(icon);
if (image==null) {
image = new ImageView(new Image(icon));
if (icon != null)
if (icon.length() > 0) {
ImageView image = new ImageView(new Image(icon));
image.setFitHeight(16);
image.setFitWidth(16);
imagesperpath.put(icon, image);

if (image != null)
menu.setGraphic(image);
}
if (image!=null) menu.setGraphic(image);
}
for (int i = 0; i < listofitems.size(); i++) {
menu.getItems().add(listofitems.get(i).getMenuItem(actionmanager, inputdata, parentwindow));
}
Expand Down

0 comments on commit 36d4f9a

Please sign in to comment.