/** * 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); }
private void init(boolean vertical, AbstractImagePrototype subMenuIcon) { this.subMenuIcon = subMenuIcon; Element table = DOM.createTable(); 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(); }
public SingleBorder(boolean top, boolean left, boolean right, boolean bottom) { super(DOM.createTable()); this.layout = getElement(); this.container = DOM.createTD(); setStyleName("advanced-SingleBorder"); linesVisibility.put(BorderLine.TOP, top); linesVisibility.put(BorderLine.LEFT, left); linesVisibility.put(BorderLine.RIGHT, right); linesVisibility.put(BorderLine.BOTTOM, bottom); render(); }
/** * 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); }
private void buildAndInsertAnimatingDiv() { cloneDiv = DOM.createDiv(); cloneDiv.addClassName("v-treetable-animation-clone-wrapper"); cloneTable = DOM.createTable(); cloneTable.addClassName("v-treetable-animation-clone"); cloneDiv.appendChild(cloneTable); insertAnimatingDiv(); }
public RowTable() { // copy/paste from HTMLTable table = DOM.createTable(); head = DOM.createTHead(); body = DOM.createTBody(); table.appendChild(head); table.appendChild(body); setElement(table); }
@UiConstructor public HTreeTable() { m_table = DOM.createTable(); m_table.setAttribute( "border", "1" ); m_table.addClassName( Css.CSS.main() ); setElement( m_table ); addDomHandler( this, ClickEvent.getType() ); }
/** * 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); }
@UiConstructor public HTreeTable() { m_table = DOM.createTable(); m_table.setAttribute( "border", "1" ); m_table.addClassName( Css.CSS.main() ); setElement( m_table ); addDomHandler( this, ClickEvent.getType() ); }