BrightSide Workbench Full Report + Source Code
org.turro.menu.ElephantSubmenu Class Reference
Inheritance diagram for org.turro.menu.ElephantSubmenu:
Collaboration diagram for org.turro.menu.ElephantSubmenu:

Public Member Functions

ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantMenu addMenu (String label)
 
ElephantMenu addMenu (String label, String image)
 
ElephantMenu addMenu (String label, Permission permission)
 
ElephantMenu addMenu (String label, String image, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String include)
 
ElephantSubmenu addMenuitem (String label, EventListener listener)
 
ElephantSubmenu addMenuitem (String label, EventListener listener, boolean toolButton)
 
ElephantSubmenu addMenuitem (String label, String image, String include)
 
ElephantSubmenu addMenuitem (String label, String image, EventListener listener)
 
ElephantSubmenu addMenuitem (String label, String image, String include, boolean toolButton)
 
ElephantSubmenu addMenuitem (String label, String image, EventListener listener, boolean toolButton)
 
ElephantSubmenu addMenuitem (String label, String include, Permission permission)
 
ElephantSubmenu addMenuitem (String label, EventListener listener, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String include, boolean toolButton, Permission permission)
 
ElephantSubmenu addMenuitem (String label, EventListener listener, boolean toolButton, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String image, String include, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String image, EventListener listener, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String image, String include, boolean toolButton, Permission permission)
 
ElephantSubmenu addMenuitem (String label, String image, EventListener listener, boolean toolButton, Permission permission)
 
ElephantSubmenu addMenuSeparator ()
 
ElephantSubmenu addExternalsToSession (Collection< ElephantMenu > externals)
 
ElephantSubmenu addExternalsToTools (Collection< ElephantMenu > externals)
 
ElephantSubmenu addToolbarSeparator (boolean bar)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 41 of file ElephantSubmenu.java.

Member Function Documentation

◆ addExternalsToSession()

ElephantSubmenu org.turro.menu.ElephantSubmenu.addExternalsToSession ( Collection< ElephantMenu externals)

Definition at line 174 of file ElephantSubmenu.java.

174  {
175  for(ElephantMenu em : externals) {
176  em.addToSessionMenu(this);
177  }
178  return this;
179  }

◆ addExternalsToTools()

ElephantSubmenu org.turro.menu.ElephantSubmenu.addExternalsToTools ( Collection< ElephantMenu externals)

Definition at line 181 of file ElephantSubmenu.java.

181  {
182  for(ElephantMenu em : externals) {
183  em.addToToolsMenu(this);
184  }
185  return this;
186  }

◆ addMenu() [1/4]

ElephantMenu org.turro.menu.ElephantSubmenu.addMenu ( String  label)

Definition at line 57 of file ElephantSubmenu.java.

57  {
58  return addMenu(label, null, null);
59  }
ElephantMenu addMenu(String label)
Here is the caller graph for this function:

◆ addMenu() [2/4]

ElephantMenu org.turro.menu.ElephantSubmenu.addMenu ( String  label,
Permission  permission 
)

Definition at line 65 of file ElephantSubmenu.java.

65  {
66  return addMenu(label, null, permission);
67  }
Here is the call graph for this function:

◆ addMenu() [3/4]

ElephantMenu org.turro.menu.ElephantSubmenu.addMenu ( String  label,
String  image 
)

Definition at line 61 of file ElephantSubmenu.java.

61  {
62  return addMenu(label, image, null);
63  }
Here is the call graph for this function:

◆ addMenu() [4/4]

ElephantMenu org.turro.menu.ElephantSubmenu.addMenu ( String  label,
String  image,
Permission  permission 
)

Definition at line 69 of file ElephantSubmenu.java.

69  {
70  checkSeparator();
71  ElephantMenu m = image == null ? new ElephantMenu(label) : new ElephantMenu(label, image);
72  appendChild(m);
73  if(permission != null) m.setVisible(permission.check());
74  return m;
75  }
Here is the call graph for this function:

◆ addMenuitem() [1/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
EventListener  listener 
)

Definition at line 81 of file ElephantSubmenu.java.

81  {
82  return addMenuitem(label, null, listener);
83  }
ElephantSubmenu addMenuitem(String label, String include)
Here is the call graph for this function:

◆ addMenuitem() [2/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
EventListener  listener,
boolean  toolButton 
)

Definition at line 85 of file ElephantSubmenu.java.

85  {
86  return addMenuitem(label, null, listener, toolButton);
87  }
Here is the call graph for this function:

◆ addMenuitem() [3/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
EventListener  listener,
boolean  toolButton,
Permission  permission 
)

Definition at line 117 of file ElephantSubmenu.java.

117  {
118  return addMenuitem(label, null, listener, toolButton, permission);
119  }
Here is the call graph for this function:

◆ addMenuitem() [4/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
EventListener  listener,
Permission  permission 
)

Definition at line 109 of file ElephantSubmenu.java.

109  {
110  return addMenuitem(label, null, listener, permission);
111  }
Here is the call graph for this function:

◆ addMenuitem() [5/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
EventListener  listener 
)

Definition at line 93 of file ElephantSubmenu.java.

93  {
94  return addMenuitem(label, image, listener, false);
95  }
Here is the call graph for this function:

◆ addMenuitem() [6/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
EventListener  listener,
boolean  toolButton 
)

Definition at line 101 of file ElephantSubmenu.java.

101  {
102  return addMenuitem(label, image, listener, toolButton, null);
103  }
Here is the call graph for this function:

◆ addMenuitem() [7/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
EventListener  listener,
boolean  toolButton,
Permission  permission 
)

Definition at line 142 of file ElephantSubmenu.java.

142  {
143  if(permission == null || permission.check()) {
144  ElephantToolbar toolbar = getToolbar();
145  if(toolButton && toolbar != null) {
146  Toolbarbutton button = new Toolbarbutton();
147  toolbar.addComponent(button);
148  button.setTooltiptext(I_.get(label));
149  if(!Strings.isBlank(image)) {
150  button.setImage(Images.getImage(image));
151  }
152  if(listener != null) {
153  button.addEventListener(Events.ON_CLICK, listener);
154  }
155  }
156  checkSeparator();
157  Menuitem mi = new Menuitem(I_.get(label));
158  if(!Strings.isBlank(image)) {
159  mi.setImage(Images.getImage(image));
160  }
161  appendChild(mi);
162  if(listener != null) {
163  mi.addEventListener(Events.ON_CLICK, listener);
164  }
165  }
166  return this;
167  }
Here is the call graph for this function:

◆ addMenuitem() [8/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
EventListener  listener,
Permission  permission 
)

Definition at line 125 of file ElephantSubmenu.java.

125  {
126  return addMenuitem(label, image, listener, false, permission);
127  }
Here is the call graph for this function:

◆ addMenuitem() [9/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
String  include 
)

Definition at line 89 of file ElephantSubmenu.java.

89  {
90  return addMenuitem(label, image, include, false);
91  }
Here is the call graph for this function:

◆ addMenuitem() [10/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
String  include,
boolean  toolButton 
)

Definition at line 97 of file ElephantSubmenu.java.

97  {
98  return addMenuitem(label, image, include, toolButton, null);
99  }
Here is the call graph for this function:

◆ addMenuitem() [11/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
String  include,
boolean  toolButton,
Permission  permission 
)

Definition at line 129 of file ElephantSubmenu.java.

129  {
130  if(permission == null || permission.check()) {
131  EventListener listener = null;
132  if(include != null) {
133  listener = (EventListener) (Event event) -> {
134  Framework.getCurrent().addContent(I_.get(label), ElephantMenu.makeInclude(include));
135  };
136  }
137  return addMenuitem(label, image, listener, toolButton, permission);
138  }
139  return this;
140  }
Here is the call graph for this function:

◆ addMenuitem() [12/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  image,
String  include,
Permission  permission 
)

Definition at line 121 of file ElephantSubmenu.java.

121  {
122  return addMenuitem(label, image, include, false, permission);
123  }
Here is the call graph for this function:

◆ addMenuitem() [13/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  include 
)

Definition at line 77 of file ElephantSubmenu.java.

77  {
78  return addMenuitem(label, null, include);
79  }
Here is the caller graph for this function:

◆ addMenuitem() [14/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  include,
boolean  toolButton,
Permission  permission 
)

Definition at line 113 of file ElephantSubmenu.java.

113  {
114  return addMenuitem(label, null, include, toolButton, permission);
115  }
Here is the call graph for this function:

◆ addMenuitem() [15/15]

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuitem ( String  label,
String  include,
Permission  permission 
)

Definition at line 105 of file ElephantSubmenu.java.

105  {
106  return addMenuitem(label, null, include, permission);
107  }
Here is the call graph for this function:

◆ addMenuSeparator()

ElephantSubmenu org.turro.menu.ElephantSubmenu.addMenuSeparator ( )

Definition at line 169 of file ElephantSubmenu.java.

169  {
170  if(!getChildren().isEmpty()) separator = true;
171  return this;
172  }
Here is the caller graph for this function:

◆ addToolbarSeparator()

ElephantSubmenu org.turro.menu.ElephantSubmenu.addToolbarSeparator ( boolean  bar)

Definition at line 188 of file ElephantSubmenu.java.

188  {
189  getToolbar().addSeparator(false);
190  return this;
191  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMenuBar()

ElephantMenuBar org.turro.menu.ElephantSubmenu.getMenuBar ( )

Definition at line 45 of file ElephantSubmenu.java.

45  {
46  return Components.from(this).parent(ElephantMenuBar.class);
47  }
Here is the call graph for this function:

◆ getParentMenu()

ElephantMenu org.turro.menu.ElephantSubmenu.getParentMenu ( )

Definition at line 49 of file ElephantSubmenu.java.

49  {
50  return Components.from(this).parent(ElephantMenu.class);
51  }
Here is the call graph for this function:

◆ getParentSubmenu()

ElephantSubmenu org.turro.menu.ElephantSubmenu.getParentSubmenu ( )

Definition at line 53 of file ElephantSubmenu.java.

53  {
54  return Components.from(this).parent(ElephantSubmenu.class);
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: