Examples of HtmlTableRow


Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

        Collections.sort(data, HTMLCoverageData.by(field));

        int currentValue = Integer.MIN_VALUE;
        final int matched[] = new int[]{0};
        for (int i = 0; i < data.size(); i++) {
            HtmlTableRow htmlTableRow = (HtmlTableRow) page.getByXPath("//tbody[@id='summaryTbody']/tr[" + (i + 1) + "]").get(0);
            currentValue = verifyRow(page, field, currentValue, matched, htmlTableRow);
        }
        assertThat(matched[0], equalTo(data.size()));
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

        assertTrue(tableList.size() == 1);
        HtmlTable table = tableList.get(0);
        List<HtmlTableRow> rows = table.getRows();
        assertTrue(rows.size() == 6);
        for (int i = 0, len = rows.size(); i < len; i++) {
            HtmlTableRow row = rows.get(i);
            if (i % 2 == 0) {
                assertTrue(row.getClassAttribute().equals("b1"));
            } else {
                assertTrue(row.getClassAttribute().equals("b2"));
            }
        }
       
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

        element = elementIterator.next();
        // this is a htmlunit bug
        assertEquals( "tbody", element.getTagName() );

        HtmlTableRow tr = (HtmlTableRow) elementIterator.next();
        HtmlTableHeaderCell th = (HtmlTableHeaderCell) elementIterator.next();

        th = (HtmlTableHeaderCell) elementIterator.next();
        assertEquals( "center", th.getAttribute( "align" ) );
        assertEquals( "2", th.getAttribute( "colspan" ) );
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

     * Returns the index of the row within the parent table.
     * @return the index of the row within the parent table
     * @see <a href="http://msdn.microsoft.com/en-us/library/ms534377.aspx">MSDN Documentation</a>
     */
    public int jsxGet_rowIndex() {
        final HtmlTableRow row = (HtmlTableRow) getDomNodeOrDie();
        final HtmlTable table = row.getEnclosingTable();
        if (table == null) { // a not attached document.createElement('TR')
            return -1;
        }
        return table.getRows().indexOf(row);
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

    public Object jsxFunction_insertCell(final Object index) {
        int position = -1;
        if (index != Undefined.instance) {
            position = (int) Context.toNumber(index);
        }
        final HtmlTableRow htmlRow = (HtmlTableRow) getDomNodeOrDie();

        final boolean indexValid = (position >= -1 && position <= htmlRow.getCells().size());
        if (indexValid) {
            final HtmlElement newCell = ((HtmlPage) htmlRow.getPage()).createElement("td");
            if (position == -1 || position == htmlRow.getCells().size()) {
                htmlRow.appendChild(newCell);
            }
            else {
                htmlRow.getCell(position).insertBefore(newCell);
            }
            return getScriptableFor(newCell);
        }
        throw Context.reportRuntimeError("Index or size is negative or greater than the allowed amount");
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

        }
        else if (getBrowserVersion().isFirefox()) {
            throw Context.reportRuntimeError("No enough arguments");
        }

        final HtmlTableRow htmlRow = (HtmlTableRow) getDomNodeOrDie();

        if (position == -1) {
            position = htmlRow.getCells().size() - 1;
        }
        final boolean indexValid = (position >= -1 && position <= htmlRow.getCells().size());
        if (!indexValid) {
            throw Context.reportRuntimeError("Index or size is negative or greater than the allowed amount");
        }

        htmlRow.getCell(position).remove();
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

            return (int) w;
        }

        final ComputedCSSStyleDeclaration style = jsxGet_currentStyle();
        if ("collapse".equals(style.jsxGet_borderCollapse())) {
            final HtmlTableRow row = getRow();
            if (row != null) {
                final HtmlElement thiz = getDomNodeOrDie();
                final List<HtmlTableCell> cells = row.getCells();
                final boolean ie = getBrowserVersion().isIE();
                final boolean leftmost = (cells.indexOf(thiz) == 0);
                final boolean rightmost = (cells.indexOf(thiz) == cells.size() - 1);
                w -= ((ie && leftmost ? 0 : 0.5) * style.getBorderLeft());
                w -= ((ie && rightmost ? 0 : 0.5) * style.getBorderRight());
 
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableRow

     * @return the index of this cell within the parent row
     * @see <a href="http://msdn.microsoft.com/en-us/library/ms533549.aspx">MSDN Documentation</a>
     */
    public Integer jsxGet_cellIndex() {
        final HtmlTableCell cell = (HtmlTableCell) getDomNodeOrDie();
        final HtmlTableRow row = cell.getEnclosingRow();
        if (row == null) { // a not attached document.createElement('TD')
            return -1;
        }
        return new Integer(row.getCells().indexOf(cell));
    }
View Full Code Here

Examples of pt.ist.fenixWebFramework.renderers.components.HtmlTableRow

            }
        }
    }

    protected void drawCurricularRuleRow(final CurricularRule rule, final HtmlTable main, int level) {
        final HtmlTableRow groupRow = main.createRow();
        groupRow.setClasses(getCurricularRuleRowClass());
        addTabsToRow(groupRow, level);

        final HtmlTableCell cell = groupRow.createCell();
        cell.setClasses(getLabelCellClass());
        cell.setColspan(getMaxLineSize() - level);
        cell.setText(CurricularRuleLabelFormatter.getLabel(rule));

    }
View Full Code Here

Examples of pt.ist.fenixWebFramework.renderers.components.HtmlTableRow

            final HtmlTable groupTable = new HtmlTable();
            container.addChild(groupTable);
            groupTable.setClasses(getTablesClasses());
            groupTable.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());

            final HtmlTableCell nameCell = htmlTableRow.createCell();
            nameCell.setBody(new HtmlText(curriculumGroup.getFullPath()));
            nameCell.setClasses(getGroupNameClasses());

            final HtmlTableCell radioButtonCell = htmlTableRow.createCell();
            final HtmlRadioButton radioButton = radioButtonGroup.createRadioButton();
            radioButton.setUserValue(MetaObjectFactory.createObject(curriculumGroup, new Schema(CurriculumGroup.class)).getKey()
                    .toString());
            radioButton.setChecked(curriculumGroup == dismissalBean.getCurriculumGroup());
            radioButtonCell.setBody(radioButton);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.