Examples of HtmlTableCell


Examples of com.gargoylesoftware.htmlunit.html.HtmlTableCell

    private void verifySource(HtmlTable sourceTable, int row, int coverageCount, String source, String alertLine, String cssClass) throws IOException {
        assertThat(sourceTable.getRow(row).getCell(1).asText(), equalTo(""+coverageCount));
        assertThat(sourceTable.getRow(row).getCell(3).asText(), equalTo(source));

        HtmlTableCell branchCell = sourceTable.getRow(row).getCell(2);
        if (alertLine == null) {
            assertThat(branchCell.asText(), equalTo(" "));
            assertThat(branchCell.getAttribute("class"), equalTo("numeric "+cssClass));
        } else {
            assertThat(branchCell.asText(), equalTo("info"));
            HtmlAnchor anchor = (HtmlAnchor) branchCell.getFirstChild().getFirstChild();

            final String alert[] = new String[1];
            webClient.setAlertHandler(new AlertHandler() {
                public void handleAlert(Page page, String message) {
                    alert[0] = message;
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableCell

    Iterator allHtmlChildElements = htmlElementsByTagName.iterator();
    int counter = 0;
   
    while (allHtmlChildElements.hasNext()) {
      HtmlTable table = (HtmlTable) allHtmlChildElements.next();
      HtmlTableCell handleCell = (HtmlTableCell) table.getCellAt(0, 0);
      HtmlTableCell iconCell = (HtmlTableCell) table.getCellAt(0, 1);
      HtmlTableCell textCell = (HtmlTableCell) table.getCellAt(0, 2);
     
      Element element = (Element) findNode(textCell.asText(), document);
      //skip text siblings
      Node nextSibling = element.getNextSibling();
     
      //System.out.println(table);
      //System.out.println(handleCell);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlTableCell

     * Returns the index of this cell within the parent row.
     * @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.HtmlTableCell

            link.setUrl(DegreeCurricularPlanLayout.SPACER_IMAGE_PATH);

            final HtmlImage spacerImage = new HtmlImage();
            spacerImage.setSource(link.calculateUrl());

            final HtmlTableCell tabCell = row.createCell();
            tabCell.setClasses(getTabCellClass());
            tabCell.setBody(spacerImage);
        }
    }
View Full Code Here

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

            tabCell.setBody(spacerImage);
        }
    }

    protected void drawCurricularCourseName(final CurricularCourse course, final HtmlTableRow row, boolean linkable, int level) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getCurriclarCourseCellClass());
        cell.setColspan(getMaxColSpanForTextOnCurricularCourses() - level);

        if (linkable) {
            final HtmlLink result = new HtmlLink();

            result.setText(course.getNameI18N(getExecutionInterval()).getContent());
            result.setModuleRelative(true);

            result.setUrl(getViewCurricularCourseUrl());
            result.setParameter(getDegreeModuleIdAttributeName(), course.getExternalId());

            for (final Pair<String, String> param : getViewCurricularCourseUrlParameters()) {
                result.setParameter(param.getKey(), param.getValue());
            }

            cell.setBody(result);

        } else {
            cell.setText(course.getNameI18N(getExecutionInterval()).getContent());
        }
    }
View Full Code Here

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

            cell.setText(course.getNameI18N(getExecutionInterval()).getContent());
        }
    }

    protected void drawOptionalCellInformation(final HtmlTableRow row) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getOptionalInformationCellClass());

        cell.setColspan(getMaxColSpanForOptionalCurricularCourse());
        cell.setText(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.option"));
    }
View Full Code Here

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

        cell.setColspan(getMaxColSpanForOptionalCurricularCourse());
        cell.setText(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.option"));
    }

    protected void drawRegime(final CurricularCourse course, final HtmlTableRow row) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getRegimeCellClass());
        cell.setText(hasRegime(course) ? course.getRegime(getExecutionInterval()).getAcronym() : EMPTY_CELL);
        cell.setTitle(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.title.regime"));
    }
View Full Code Here

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

    private boolean hasRegime(final CurricularCourse curricularCourse) {
        return !curricularCourse.isOptionalCurricularCourse() && curricularCourse.hasRegime(getExecutionInterval());
    }

    protected void drawCourseLoad(final CurricularCourse course, final CurricularPeriod period, final HtmlTableRow row) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getCourseLoadCellClass());

        if (course.isOptionalCurricularCourse()) {
            cell.setText(EMPTY_CELL);
        } else {
            final StringBuilder builder = new StringBuilder();

            builder.append(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.acronym.contact.load"))
                    .append("-");
            builder.append(roundValue(course.getContactLoad(period, getExecutionInterval()))).append(" ");

            builder.append(
                    BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.acronym.autonomous.work"))
                    .append("-");
            builder.append(course.getAutonomousWorkHours(period, getExecutionInterval()).toString()).append(" ");

            builder.append(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.acronym.total.load"))
                    .append("-");
            builder.append(course.getTotalLoad(period, getExecutionInterval()));

            cell.setText(builder.toString());
        }

        cell.setTitle(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.title.course.load"));
    }
View Full Code Here

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

        cell.setTitle(BundleUtil.getString(Bundle.APPLICATION, "label.degreeCurricularPlan.renderer.title.course.load"));
    }

    protected void drawEctsCredits(final CurricularCourse course, final CurricularPeriod period, final HtmlTableRow row) {
        final HtmlTableCell cell = row.createCell();
        cell.setClasses(getEctsCreditsCellClass());
        cell.setText(course.isOptionalCurricularCourse() ? EMPTY_CELL : course.getEctsCredits(period, getExecutionInterval())
                .toString());
    }
View Full Code Here

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

    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
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.