/** * Create a new empty HTML Table. */ public HTMLTable() { tableElem = DOM.createTable(); bodyElem = DOM.createTBody(); DOM.appendChild(tableElem, bodyElem); setElement(tableElem); }
public CellPanel() { table = DOM.createTable(); body = DOM.createTBody(); DOM.appendChild(table, body); setElement(table); }
/** * Creates an empty stack panel. */ public StackPanel() { Element table = DOM.createTable(); setElement(table); body = DOM.createTBody(); DOM.appendChild(table, body); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); DOM.sinkEvents(table, Event.ONCLICK); setStyleName(DEFAULT_STYLENAME); }
@Override Element createHeaderElem() { // Create the table Element table = DOM.createTable(); Element tbody = DOM.createTBody(); DOM.appendChild(table, tbody); table.getStyle().setProperty("width", "100%"); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); // Add the decorated rows for (int i = 0; i < DEFAULT_ROW_STYLENAMES.length; i++) { DOM.appendChild(tbody, DecoratorPanel.createTR(DEFAULT_ROW_STYLENAMES[i])); } // Return the table return table; }
/** * Creates a new panel using the specified style names to apply to each row. * Each row will contain three cells (Left, Center, and Right). The Center * cell in the containerIndex row will contain the {@link Widget}. * * @param rowStyles an array of style names to apply to each row * @param containerIndex the index of the container row */ DecoratorPanel(String[] rowStyles, int containerIndex) { super(DOM.createTable()); // Add a tbody Element table = getElement(); tbody = DOM.createTBody(); DOM.appendChild(table, tbody); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); // Add each row for (int i = 0; i < rowStyles.length; i++) { Element row = createTR(rowStyles[i]); DOM.appendChild(tbody, row); if (i == containerIndex) { containerElem = DOM.getFirstChild(DOM.getChild(row, 1)); } } // Set the overall style name setStyleName(DEFAULT_STYLENAME); }
body = DOM.createTBody(); DOM.appendChild(table, body);
private DefaultHeader(Imager imager, String text) { this.imager = imager; iconImage = imager.makeImage(); // I do not need any Widgets here, just a DOM structure. Element root = DOM.createTable(); Element tbody = DOM.createTBody(); Element tr = DOM.createTR(); final Element imageTD = DOM.createTD(); labelTD = DOM.createTD(); setElement(root); DOM.appendChild(root, tbody); DOM.appendChild(tbody, tr); DOM.appendChild(tr, imageTD); DOM.appendChild(tr, labelTD); // set image TD to be same width as image. imageTD.setPropertyString("align", "center"); imageTD.setPropertyString("valign", "middle"); imageTD.getStyle().setProperty("width", iconImage.getWidth() + "px"); DOM.appendChild(imageTD, iconImage.getElement()); setText(text); addOpenHandler(this); addCloseHandler(this); setStyle(); }
/** * Setup clonable elements. */ void initializeClonableElements() { if (GWT.isClient()) { // Create the base table element that will be cloned. BASE_INTERNAL_ELEM = DOM.createTable(); Element contentElem = DOM.createDiv(); Element tbody = DOM.createTBody(), tr = DOM.createTR(); Element tdImg = DOM.createTD(), tdContent = DOM.createTD(); DOM.appendChild(BASE_INTERNAL_ELEM, tbody); DOM.appendChild(tbody, tr); DOM.appendChild(tr, tdImg); DOM.appendChild(tr, tdContent); tdImg.getStyle().setProperty("verticalAlign", "middle"); tdContent.getStyle().setProperty("verticalAlign", "middle"); DOM.appendChild(tdContent, contentElem); contentElem.getStyle().setProperty("display", "inline"); setStyleName(contentElem, "gwt-TreeItem"); BASE_INTERNAL_ELEM.getStyle().setProperty("whiteSpace", "nowrap"); // Create the base element that will be cloned BASE_BARE_ELEM = DOM.createDiv(); // Simulates padding from table element. BASE_BARE_ELEM.getStyle().setProperty("padding", "3px"); DOM.appendChild(BASE_BARE_ELEM, contentElem); Roles.getTreeitemRole().set(contentElem); } } }
public CellPanel() { table = DOM.createTable(); body = DOM.createTBody(); DOM.appendChild(table, body); setElement(table); }
/** * Create a new empty HTML Table. */ public HTMLTable() { tableElem = DOM.createTable(); bodyElem = DOM.createTBody(); DOM.appendChild(tableElem, bodyElem); setElement(tableElem); }
public CellPanel() { table = DOM.createTable(); body = DOM.createTBody(); DOM.appendChild(table, body); setElement(table); }
/** * Create a new empty HTML Table. */ public HTMLTable() { tableElem = DOM.createTable(); bodyElem = DOM.createTBody(); DOM.appendChild(tableElem, bodyElem); setElement(tableElem); }
/** * Create a new empty HTML Table. */ public HTMLTable() { super(); tableElem = DOM.createTable(); bodyElem = DOM.createTBody(); DOM.appendChild(tableElem, bodyElem); setElement(tableElem); sinkEvents(Event.ONCLICK); }
public RowTable() { // copy/paste from HTMLTable table = DOM.createTable(); head = DOM.createTHead(); body = DOM.createTBody(); table.appendChild(head); table.appendChild(body); setElement(table); }
/** * Creates an empty stack panel. */ public StackPanel() { Element table = DOM.createTable(); setElement(table); body = DOM.createTBody(); DOM.appendChild(table, body); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); DOM.sinkEvents(table, Event.ONCLICK); setStyleName(DEFAULT_STYLENAME); }
/** * Creates an empty stack panel. */ public WSStackPanel() { Element table = DOM.createTable(); setElement(table); body = DOM.createTBody(); DOM.appendChild(table, body); DOM.setElementPropertyInt(table, "cellSpacing", 0); DOM.setElementPropertyInt(table, "cellPadding", 0); DOM.sinkEvents(table, Event.ONCLICK); setStyleName(DEFAULT_STYLENAME); }
/** * Creates an empty stack panel. */ public StackPanel() { Element table = DOM.createTable(); setElement(table); body = DOM.createTBody(); DOM.appendChild(table, body); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); DOM.sinkEvents(table, Event.ONCLICK); setStyleName(DEFAULT_STYLENAME); }
@Override Element createHeaderElem() { // Create the table Element table = DOM.createTable(); Element tbody = DOM.createTBody(); DOM.appendChild(table, tbody); table.getStyle().setProperty("width", "100%"); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); // Add the decorated rows for (int i = 0; i < DEFAULT_ROW_STYLENAMES.length; i++) { DOM.appendChild(tbody, DecoratorPanel.createTR(DEFAULT_ROW_STYLENAMES[i])); } // Return the table return table; }
@Override Element createHeaderElem() { // Create the table Element table = DOM.createTable(); Element tbody = DOM.createTBody(); DOM.appendChild(table, tbody); table.getStyle().setProperty("width", "100%"); table.setPropertyInt("cellSpacing", 0); table.setPropertyInt("cellPadding", 0); // Add the decorated rows for (int i = 0; i < DEFAULT_ROW_STYLENAMES.length; i++) { DOM.appendChild(tbody, DecoratorPanel.createTR(DEFAULT_ROW_STYLENAMES[i])); } // Return the table return table; }
private DefaultHeader(Imager imager, String text) { this.imager = imager; iconImage = imager.makeImage(); // I do not need any Widgets here, just a DOM structure. Element root = DOM.createTable(); Element tbody = DOM.createTBody(); Element tr = DOM.createTR(); final Element imageTD = DOM.createTD(); labelTD = DOM.createTD(); setElement(root); DOM.appendChild(root, tbody); DOM.appendChild(tbody, tr); DOM.appendChild(tr, imageTD); DOM.appendChild(tr, labelTD); // set image TD to be same width as image. imageTD.setPropertyString("align", "center"); imageTD.setPropertyString("valign", "middle"); imageTD.getStyle().setProperty("width", iconImage.getWidth() + "px"); DOM.appendChild(imageTD, iconImage.getElement()); setText(text); addOpenHandler(this); addCloseHandler(this); setStyle(); }