/** * Sets the selected tab panel. */ public void setSelectedPanel(Tabpanel panel) { if (panel == null) throw new IllegalArgumentException("null tabpanel"); if (panel.getTabbox() != this) throw new UiException("Not a child: " + panel); final Tab tab = panel.getLinkedTab(); if (tab != null) setSelectedTab(tab); }
/** Returns the tab associated with this tab panel. */ public Tab getLinkedTab() { final int j = getIndex(); if (j >= 0) { final Tabbox tabbox = getTabbox(); if (tabbox != null) { final Tabs tabs = tabbox.getTabs(); if (tabs != null && tabs.getChildren().size() > j) return (Tab) tabs.getChildren().get(j); } } return null; }
public void render(Component comp, Writer out) throws IOException { final Tabpanel self = (Tabpanel) comp; final Tabbox tabbox = self.getTabbox(); final String mold = tabbox.getMold(); if ("accordion".equals(mold) || "accordion-lite".equals(mold)) { _acdpanel.render(comp, out); return; } if ("vertical".equals(tabbox.getOrient())) { _vpanel.render(comp, out); return; } final SmartWriter wh = new SmartWriter(out); wh.write("<div id=\"").write(self.getUuid()).write('"') .write(" z.type=\"zul.tab2.Tabpanel2\"") .write(self.getOuterAttrs()) .write('>') .write("<div id=\"").write(self.getUuid()).write("!real\" ") .write(self.getInnerAttrs()).write('>') .writeChildren(self) .writeln("</div></div>"); } }
public void renderTabpanel(Tabpanel item, final Object data, final int index) throws Exception { final Tabbox tabbox = item.getTabbox(); final Tabpanels tabpanels = tabbox.getTabpanels(); final int size = tabbox.getModel().getSize();
final Tab tab = self.getLinkedTab(); if (tab == null) return; //generate nothing (Bug 1848377) final Tabbox tabbox = self.getTabbox(); final String tabzcs = tab.getZclass() + '-'; final String zcs = self.getZclass();