Examples of TableCellAttributes


Examples of com.volantis.mcs.protocols.TableCellAttributes

                                                   String expectedRowspan,
                                                   String msgCol,
                                                   String colspan,
                                                   String expectedColspan) {
        Element element = domFactory.createElement();
        TableCellAttributes tableCellAttributes = new TableCellAttributes();
        tableCellAttributes.setStyles(StylesBuilder.getDeprecatedStyles());
        tableCellAttributes.setColSpan(colspan);
        tableCellAttributes.setRowSpan(rowspan);
        protocol.addTableCellAttributes(element, tableCellAttributes);
        assertEquals(msgCol, expectedColspan, element.getAttributeValue("colspan"));
        assertEquals(msgRow, expectedRowspan, element.getAttributeValue("rowspan"));
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

        wapProtocol.setEmulatorRendererContext(
                new EmulatorRendererContext(requestContext,
                        CSSStyleSheetRenderer.getSingleton(), protocol,
                        protocol.getProtocolConfiguration().getCssVersion()));

        TableCellAttributes tableCellAttributes = new TableCellAttributes();
        tableCellAttributes.setStyles(StylesBuilder.getStyles(
                "{" +
                "mcs-line-gap: 1px; " +
                "background-color: #0000ff; " +
                "background-image: url(background.jpg); " +
                "mcs-corner-radius: 1px; " +
                "text-align: right; " +
                "white-space: pre; " +
                "width: 1px; " +
                "height: 1px; " +
                "}" +
                "*:active {" +
                "background-color: #0000ff; " +
                "}"));

        Styles styles = tableCellAttributes.getStyles();

        // we need to override the style with this mock style only for testing
        // the bgimage as the actual addBackgroundImage in the style attempts
        // to perform methods on a null Volantis object.
        WapTV5_WMLVersion1_3Style style =
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

     * Test the adding of table cell attributes.
     */
    public void testAddTableCellAttributes() throws Exception {
        Element element = domFactory.createElement();

        TableCellAttributes attributes = new TableCellAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());

        protocol.addTableCellAttributes(element, attributes);

        assertEquals(protocol.supportsTabindex, true);
        String value = "test_value";
        attributes.setTabindex(value);
        protocol.addTableCellAttributes(element, attributes);
        assertEquals(element.getAttributeValue("tabindex"), value);
        assertNull(element.getAttributeValue("colspan"));
        assertNull(element.getAttributeValue("rowspan"));

        attributes.setColSpan(value);
        protocol.addTableCellAttributes(element, attributes);
        assertEquals(element.getAttributeValue("tabindex"), value);
        assertEquals(element.getAttributeValue("colspan"), value);
        assertNull(element.getAttributeValue("rowspan"));

        attributes.setRowSpan(value);
        protocol.addTableCellAttributes(element, attributes);
        assertEquals(element.getAttributeValue("tabindex"), value);
        assertEquals(element.getAttributeValue("colspan"), value);
        assertEquals(element.getAttributeValue("rowspan"), value);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

        privateSetup();

        Element element = domFactory.createElement();
        element.setName("td");

        TableCellAttributes attributes = createTableCellAttributes(
                attributeValueHorizontal, attributeValueVertical);
        protocol.addTableCellAttributes(element, attributes);
        return element;
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

    private TableCellAttributes
            createTableCellAttributes(String horizontal,
                                      String vertical) {

        TableCellAttributes attributes = new TableCellAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                getCssAlign(horizontal, vertical)));

        return attributes;
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

        MutablePropertyValues tableCellProperties = createPropertyValues();
        tableCellProperties.setComputedValue(
                StylePropertyDetails.VERTICAL_ALIGN,
                VerticalAlignKeywords.BOTTOM);

        TableCellAttributes tableCellAttributes = new TableCellAttributes();
        tableCellAttributes.setStyles(StylesBuilder.getInitialValueStyles());
        protocol.openTableDataCell(buffer, tableCellAttributes);

        final String actual = bufferToString(buffer);

        verifyStyleVerticalAlignTD(actual);
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

        LocalizationFactory.createExceptionLocalizer(TableDataElement.class);

    public TableDataElement(XDIMEContextInternal context) {
        super(XHTML2Elements.TD, context);

        protocolAttributes = new TableCellAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

    /**
     * This method tests the method public void writeOpenTableDataCell ( TableCellAttributes )
     * for the com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void testWriteOpenTableDataCell() throws Exception {
        final TableCellAttributes attributes = (TableCellAttributes)
            provideAttributes(TableCellAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

    /**
     * This method tests the method public void writeOpenTableHeaderCell ( TableCellAttributes )
     * for the com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void testWriteOpenTableHeaderCell() throws Exception {
        final TableCellAttributes attributes = (TableCellAttributes)
            provideAttributes(TableCellAttributes.class);

        final VolantisProtocol protocol = getProtocol();

        MethodInvoker invoker = new MethodInvoker() {
View Full Code Here

Examples of com.volantis.mcs.protocols.TableCellAttributes

     * @param protocol
     * @throws ProtocolException
     */
    protected void closeTableDataCellElement(VolantisProtocol protocol)
            throws ProtocolException {
        TableCellAttributes tableCellAttributes;
        try {
            tableCellAttributes = (TableCellAttributes) this.attributesStack
                    .pop();
        } catch (EmptyStackException e) {
            throw new ProtocolException(exceptionLocalizer.format("widget-td-not-opened"),e);           
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.