BrightSide Workbench Full Report + Source Code
org.turro.zul.frame.ContainerTab Class Reference
Inheritance diagram for org.turro.zul.frame.ContainerTab:
Collaboration diagram for org.turro.zul.frame.ContainerTab:

Public Member Functions

 ContainerTab ()
 
void addContent (String label, String src)
 
void addContent (String label, String src, Map< String, Object > dynProps)
 
void addContent (PortalContainer container)
 
void invalidateSelected ()
 
void closeSelected ()
 
void setSelectedLabel (String text)
 
void setSelectedTooltiptext (String text)
 

Detailed Description

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

Definition at line 32 of file ContainerTab.java.

Constructor & Destructor Documentation

◆ ContainerTab()

org.turro.zul.frame.ContainerTab.ContainerTab ( )

Definition at line 38 of file ContainerTab.java.

38  {
39  setSclass("bbcontbox");
40  setVflex("1");
41  createContainers();
42  }

Member Function Documentation

◆ addContent() [1/3]

void org.turro.zul.frame.ContainerTab.addContent ( PortalContainer  container)

Definition at line 79 of file ContainerTab.java.

79  {
80  Tab tab = new Tab(container.getLabel());
81  tab.setClosable(true);
82  tabs.appendChild(tab);
83  Tabpanel panel = new Tabpanel();
84  panel.setSclass("bbcontpanel");
85  panels.appendChild(panel);
86  //container.setWidth("100%");
87  //container.setHeight("100%");
88  panel.appendChild(new Toolbar());
89  panel.appendChild(container);
90  setSelectedPanel(panel);
91  selections.push(panel);
92  container.afterCompose();
93  tab.addEventListener(Events.ON_CLOSE, new EventListener() {
94  @Override
95  public void onEvent(Event event) throws Exception {
96  Tabpanel panel = ((Tab) event.getTarget()).getLinkedPanel();
97  selections.remove(panel);
98  selectDefaultPanel();
99  }
100  });
101  }
Here is the call graph for this function:

◆ addContent() [2/3]

void org.turro.zul.frame.ContainerTab.addContent ( String  label,
String  src 
)

Definition at line 44 of file ContainerTab.java.

44  {
45  addContent(label, src, null);
46  }
void addContent(String label, String src)
Here is the caller graph for this function:

◆ addContent() [3/3]

void org.turro.zul.frame.ContainerTab.addContent ( String  label,
String  src,
Map< String, Object >  dynProps 
)

Definition at line 48 of file ContainerTab.java.

48  {
49  Tab tab = new Tab(label);
50  tab.setClosable(true);
51  tabs.appendChild(tab);
52  Tabpanel panel = new Tabpanel();
53  panel.setSclass("bbcontpanel");
54  panels.appendChild(panel);
55  Include inc = new Include(src);
56  inc.setWidth("100%");
57  inc.setHeight("100%");
58  inc.setMode("defer");
59  if(dynProps != null) {
60  for(Map.Entry<String, Object> entry : dynProps.entrySet()) {
61  if(entry.getValue() != null) {
62  inc.setDynamicProperty(entry.getKey(), entry.getValue());
63  }
64  }
65  }
66  panel.appendChild(inc);
67  setSelectedPanel(panel);
68  selections.push(panel);
69  tab.addEventListener(Events.ON_CLOSE, new EventListener() {
70  @Override
71  public void onEvent(Event event) throws Exception {
72  Tabpanel panel = ((Tab) event.getTarget()).getLinkedPanel();
73  selections.remove(panel);
74  selectDefaultPanel();
75  }
76  });
77  }

◆ closeSelected()

void org.turro.zul.frame.ContainerTab.closeSelected ( )

Definition at line 110 of file ContainerTab.java.

110  {
111  Tabpanel panel = getSelectedPanel();
112  if(panel != null) {
113  Tab tab = panel.getLinkedTab();
114  tabs.removeChild(tab);
115  panels.removeChild(panel);
116  selections.remove(panel);
117  }
118  selectDefaultPanel();
119  }
Here is the caller graph for this function:

◆ invalidateSelected()

void org.turro.zul.frame.ContainerTab.invalidateSelected ( )

Definition at line 103 of file ContainerTab.java.

103  {
104  Tabpanel panel = getSelectedPanel();
105  if(panel != null) {
106  panel.getFirstChild().invalidate();
107  }
108  }
Here is the caller graph for this function:

◆ setSelectedLabel()

void org.turro.zul.frame.ContainerTab.setSelectedLabel ( String  text)

Definition at line 121 of file ContainerTab.java.

121  {
122  Tabpanel panel = getSelectedPanel();
123  if(panel != null) {
124  Tab tab = panel.getLinkedTab();
125  tab.setLabel(text);
126  }
127  }
Here is the caller graph for this function:

◆ setSelectedTooltiptext()

void org.turro.zul.frame.ContainerTab.setSelectedTooltiptext ( String  text)

Definition at line 129 of file ContainerTab.java.

129  {
130  Tabpanel panel = getSelectedPanel();
131  if(panel != null) {
132  Tab tab = panel.getLinkedTab();
133  tab.setTooltiptext(text);
134  }
135  }
Here is the caller graph for this function:

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