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

Public Member Functions

 ElephantMenu ()
 
 ElephantMenu (String label)
 
 ElephantMenu (String label, String image)
 
ElephantMenuBar getMenuBar ()
 
ElephantMenu getParentMenu ()
 
ElephantSubmenu getParentSubmenu ()
 
ElephantSubmenu addSubmenu ()
 
int compareTo (ElephantMenu o)
 

Static Public Member Functions

static String makeInclude (String include)
 
static void showEntity (Object id, String attribute, String label, String include)
 
static void showEntity (Object id, String attribute, String label, String include, Map< String, Object > dynProps)
 
static void showZulFile (String label, String include)
 
static void showZulFile (String label, String include, Map< String, Object > dynProps)
 
static void showModalZulFile (String label, String source, Command command)
 
static void showModalZulFile (String label, String include, Map args, Command command)
 
static void showPopupZulFile (String label, String include)
 
static void showPopupZulFile (String label, String include, Map args)
 
static void showEntityModal (Object id, String attribute, String include, Command command)
 

Protected Member Functions

void addToSessionMenu (ElephantSubmenu submenu)
 
void addToMenu (ElephantMenuBar menubar)
 
void addToToolsMenu (ElephantSubmenu submenu)
 

Detailed Description

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

Definition at line 36 of file ElephantMenu.java.

Constructor & Destructor Documentation

◆ ElephantMenu() [1/3]

org.turro.menu.ElephantMenu.ElephantMenu ( )

Definition at line 38 of file ElephantMenu.java.

38  {
39  }

◆ ElephantMenu() [2/3]

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

Definition at line 41 of file ElephantMenu.java.

41  {
42  super(I_.get(label));
43  }
Here is the call graph for this function:

◆ ElephantMenu() [3/3]

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

Definition at line 45 of file ElephantMenu.java.

45  {
46  super(I_.get(label), Images.getImage(image));
47  }
Here is the call graph for this function:

Member Function Documentation

◆ addSubmenu()

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

Definition at line 61 of file ElephantMenu.java.

61  {
62  ElephantSubmenu mp = new ElephantSubmenu();
63  appendChild(mp);
64  return mp;
65  }
Here is the caller graph for this function:

◆ addToMenu()

◆ addToSessionMenu()

void org.turro.menu.ElephantMenu.addToSessionMenu ( ElephantSubmenu  submenu)
protected

◆ addToToolsMenu()

void org.turro.menu.ElephantMenu.addToToolsMenu ( ElephantSubmenu  submenu)
protected

◆ compareTo()

int org.turro.menu.ElephantMenu.compareTo ( ElephantMenu  o)

Definition at line 72 of file ElephantMenu.java.

72  {
73  int result = CompareUtil.compare(getClass().getName(), o.getClass().getName());
74  return result;
75  }

◆ getMenuBar()

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

Definition at line 49 of file ElephantMenu.java.

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

◆ getParentMenu()

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

Definition at line 53 of file ElephantMenu.java.

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

◆ getParentSubmenu()

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

Definition at line 57 of file ElephantMenu.java.

57  {
58  return Components.from(this).parent(ElephantSubmenu.class);
59  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeInclude()

static String org.turro.menu.ElephantMenu.makeInclude ( String  include)
static

Definition at line 79 of file ElephantMenu.java.

79  {
80  if(Strings.isBlank(include)) {
81  return null;
82  } else if(include.startsWith("/WEB-INF")) {
83  return include;
84  } else if(include.startsWith("//")) {
85  return include.substring(1);
86  }
87  return "/WEB-INF/_zul" + include;
88  }
Here is the caller graph for this function:

◆ showEntity() [1/2]

static void org.turro.menu.ElephantMenu.showEntity ( Object  id,
String  attribute,
String  label,
String  include 
)
static

Definition at line 90 of file ElephantMenu.java.

90  {
91  showEntity(id, attribute, label, include, null);
92  }
static void showEntity(Object id, String attribute, String label, String include)
Here is the caller graph for this function:

◆ showEntity() [2/2]

static void org.turro.menu.ElephantMenu.showEntity ( Object  id,
String  attribute,
String  label,
String  include,
Map< String, Object >  dynProps 
)
static

Definition at line 94 of file ElephantMenu.java.

94  {
95  Framework frame = Framework.getCurrent();
96  if((id instanceof Long && ((Long)id) < 1) || id == null) {
97  frame.getDesktop().removeAttribute(attribute);
98  } else {
99  frame.getDesktop().setAttribute(attribute, id);
100  }
101  if(label.startsWith("@")) {
102  frame.addContent(label.substring(1), makeInclude(include), dynProps);
103  } else {
104  frame.addContent(I_.get(label) + " #" + (id == null ? "0" : id.toString()), makeInclude(include), dynProps);
105  }
106  frame.invalidateSelected();
107  }
static String makeInclude(String include)
Here is the call graph for this function:

◆ showEntityModal()

static void org.turro.menu.ElephantMenu.showEntityModal ( Object  id,
String  attribute,
String  include,
Command  command 
)
static

Definition at line 148 of file ElephantMenu.java.

148  {
149  Framework frame = Framework.getCurrent();
150  if((id instanceof Long && ((Long)id) < 1) || id == null) {
151  frame.getDesktop().removeAttribute(attribute);
152  } else {
153  frame.getDesktop().setAttribute(attribute, id);
154  }
155  Modal.doModal(makeInclude(include), command);
156  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showModalZulFile() [1/2]

static void org.turro.menu.ElephantMenu.showModalZulFile ( String  label,
String  include,
Map  args,
Command  command 
)
static

Definition at line 126 of file ElephantMenu.java.

126  {
127  Framework frame = Framework.getCurrent();
128  if(label.startsWith("@")) {
129  frame.showModal(label.substring(1), makeInclude(include), args, command);
130  } else {
131  frame.showModal(I_.get(label), makeInclude(include), args, command);
132  }
133  }
Here is the call graph for this function:

◆ showModalZulFile() [2/2]

static void org.turro.menu.ElephantMenu.showModalZulFile ( String  label,
String  source,
Command  command 
)
static

Definition at line 122 of file ElephantMenu.java.

122  {
123  showModalZulFile(label, source, null, null);
124  }
static void showModalZulFile(String label, String source, Command command)
Here is the caller graph for this function:

◆ showPopupZulFile() [1/2]

static void org.turro.menu.ElephantMenu.showPopupZulFile ( String  label,
String  include 
)
static

Definition at line 135 of file ElephantMenu.java.

135  {
136  showPopupZulFile(label, include, null);
137  }
static void showPopupZulFile(String label, String include)

◆ showPopupZulFile() [2/2]

static void org.turro.menu.ElephantMenu.showPopupZulFile ( String  label,
String  include,
Map  args 
)
static

Definition at line 139 of file ElephantMenu.java.

139  {
140  Framework frame = Framework.getCurrent();
141  if(label.startsWith("@")) {
142  frame.showPopup(label.substring(1), makeInclude(include), args);
143  } else {
144  frame.showPopup(I_.get(label), makeInclude(include), args);
145  }
146  }
Here is the call graph for this function:

◆ showZulFile() [1/2]

static void org.turro.menu.ElephantMenu.showZulFile ( String  label,
String  include 
)
static

Definition at line 109 of file ElephantMenu.java.

109  {
110  showZulFile(label, include, null);
111  }
static void showZulFile(String label, String include)
Here is the caller graph for this function:

◆ showZulFile() [2/2]

static void org.turro.menu.ElephantMenu.showZulFile ( String  label,
String  include,
Map< String, Object >  dynProps 
)
static

Definition at line 113 of file ElephantMenu.java.

113  {
114  Framework frame = Framework.getCurrent();
115  if(label.startsWith("@")) {
116  frame.addContent(label.substring(1), makeInclude(include), dynProps);
117  } else {
118  frame.addContent(I_.get(label), makeInclude(include), dynProps);
119  }
120  }
Here is the call graph for this function:

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