protected static void writeComponent(Device d, SComponent c) throws IOException { c.write(d); }
/** * Renders the currently selected pane of the tabbed Pane. */ protected static void writeSelectedPaneContent(Device device, STabbedPane tabbedPane) throws IOException { SComponent selected = tabbedPane.getSelectedComponent(); if (selected != null) { selected.write(device); } }
public static void writeComponent(HttpServletRequest request, HttpServletResponse response, JspWriter out, SComponent component) throws IOException { synchronized (request.getSession()) { StringBuilderDevice outdev = new StringBuilderDevice(1024); component.write(outdev); out.print(outdev); SessionManager.removeSession(); } }
@Override public void write(Device d, SLayoutManager l) throws IOException { SContainer c = l.getContainer(); for (int i = 0; i < c.getComponentCount(); i++) c.getComponent(i).write(d); } }
/** * Write a cell renderer component c to device d. Before the component * is drawn it's reparented to this (if that's neccessary). * The Component p is the component we're actually drawing on. */ public void writeComponent(Device d, SComponent c, SComponent p) throws IOException { if (getParent() == null) log.warn("SCellRendererPane: parent == null!"); if (getParentFrame() == null) log.warn("SCellRendererPane: parentFrame == null!"); if (c == null || !c.isVisible()) { return; } addComponent(c); c.write(d); remove(c); } }
protected static void writeVertical(Device device, String paneName, SComponent paneComponent) throws IOException { device.print("<tr><td id=\""); device.print(paneName); device.print("\">"); paneComponent.write(device); device.print("</td></tr>"); }
protected static void writeHorizontal(Device device, String paneName, SComponent paneComponent) throws IOException { device.print("<td id=\""); device.print(paneName); device.print("\">"); paneComponent.write(device); device.print("</td>"); }
c.write(sink);
private static void printComponent(Device d, SComponent component, String alignmentStlye, Insets insets) throws IOException { if (component.isVisible()) { Utils.printNewline(d, component); d.print("<div"); Utils.optAttribute(d, "style", Utils.createInlineStylesForInsets(new StringBuilder(alignmentStlye), insets)); d.print(">"); component.write(d); // Render contained component Utils.printNewline(d, component); d.print("</div>"); } }
@Override public void writeComponent(Device d, SComponent c, SComponent p) throws IOException { if (c != null && p instanceof STable) { STable renderedTable = (STable) p; if (renderedTable.isEditing() && renderedTable.getEditorComponent() == c) { addComponent(c); c.write(d); } else { super.writeComponent(d, c, p); } } else { super.writeComponent(d, c, p); } } };
/** * Renders a container using its Layout manager or fallback just one after another. */ public static void renderContainer(Device d, SContainer c) throws IOException { final SLayoutManager layout = c.getLayout(); if (layout == null) { d.print("<tbody><tr><td>"); // just write out the components one after another for (int i = 0; i < c.getComponentCount(); i++) { c.getComponent(i).write(d); } d.print("</td></tr></tbody>"); } else { layout.write(d); } }
/** * @param d the device to write the code to * @param l the layout manager * @throws IOException */ @Override public void write(Device d, SLayoutManager l) throws IOException { SCardLayout cardLayout = (SCardLayout) l; SContainer container = l.getContainer(); SComponent c = cardLayout.getVisibleComponent(); SDimension preferredSize = container.getPreferredSize(); String height = preferredSize != null ? preferredSize.getHeight() : null; boolean clientLayout = Utils.isMSIE(container) && height != null && !"auto".equals(height); if (clientLayout) d.print("<tr yweight=\"100\">"); else openLayouterRow(d, "100%"); openLayouterCell(d, c); // Just present visible component if (c != null) { c.write(d); } closeLayouterCell(d); closeLayouterRow(d); }
c.write(d); // Render component
renderer.write(stringBuilderDevice);
SComponent menuItem = (SComponent) menue; menuItem.putClientProperty("popup", Boolean.TRUE); menuItem.write(device); menuItem.putClientProperty("popup", null);
cellRenderer.write(stringBuilderDevice); final int printedChars = Utils.writeWithoutHTML(device, stringBuilderDevice.toString());
for (SComponent menuItem : menues) { menuItem.putClientProperty("popup", Boolean.TRUE); menuItem.write(device); menuItem.putClientProperty("popup", null);