Examples of TableAttributes


Examples of com.volantis.mcs.protocols.TableAttributes

    public void testOpenTableCellspacing() throws Exception {
        privateSetUp();
        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();

        TableAttributes tableAttrs = new TableAttributes();
        tableAttrs.setStyles(StylesBuilder.getInitialValueStyles());

        protocol.openTable(buffer, tableAttrs);

        Element table = buffer.closeElement("table");
        checkTableAttributes(table);
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

     * Prove that the column attribute is not added to the element by the
     * openTable method
     */
    public void testOpenTable() {
        privateSetUp();
        TableAttributes attributes = new TableAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());

        buffer.addStyledElement("table", attributes);
        protocol.openTable(buffer, attributes);
        Element e = buffer.getCurrentElement();
        assertNull(e.getAttributeValue("columns"));
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

    private void doTestCaption(StyleKeyword captionSide,
                              boolean captionExpectedBeforeTable)
            throws Exception {
        privateSetUp();

        TableAttributes tableAttributes = new TableAttributes();
        tableAttributes.setStyles(StylesBuilder.getInitialValueStyles());
        CaptionAttributes captionAttributes = new CaptionAttributes();
        Styles captionStyles = StylesBuilder.getInitialValueStyles();
        captionStyles.getPropertyValues().setComputedValue(
                StylePropertyDetails.CAPTION_SIDE, captionSide);
        captionAttributes.setStyles(captionStyles);
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

        testable.setUpCssEmulation(true);

        // Set up the test
        Element table = domFactory.createElement();
        table.setName("table");
        TableAttributes attributes = new TableAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "border-spacing: " + borderSpacing + "px"));

        protocol.addTableAttributes(table, attributes);

        return table;
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

    /**
     * This method tests the method public void writeOpenTable ( TableAttributes )
     * for the com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void testWriteOpenTable() throws Exception {
        final TableAttributes attributes =
                (TableAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(TableAttributes.class);

        final VolantisProtocol protocol = getProtocol();

View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

     * @param protocol
     * @throws ProtocolException
     */
    protected void closeTableElement(VolantisProtocol protocol)
            throws ProtocolException {
        TableAttributes tableAttributes;
        try {
            tableAttributes = (TableAttributes) popMCSAttributes();
        } catch (EmptyStackException e) {
            throw new ProtocolException(exceptionLocalizer.format("widget-table-not-opened"),e);
        } catch (ClassCastException e) {
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

        updateStyles(divAttributes.getStyles(),stylesMap);
       
        openDivElement(protocol);
        openDivElement(protocol, divAttributes);

        TableAttributes attributes = createTableAttributes(protocol, false);
        updateStyles(attributes.getStyles(), mainTableStyles);
        createTableElement(protocol,attributes);
        for (int i = 0; i < MAIN_IMAGES_TABLE_SIZE; i++) {
            createTableRowElement(protocol);
            for (int j = 0; j < MAIN_IMAGES_TABLE_SIZE; j++) {
                createTableCellElement(protocol, idCollector, true);
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

        stylesMap.put(StylePropertyDetails.LEFT,
            STYLE_VALUE_FACTORY.getLength(null, -1 * this.imageSizePx, LengthUnit.PX));
        updateStyles(divInnerAttributes.getStyles(),stylesMap);
        openDivElement(protocol, divInnerAttributes);

        TableAttributes attributes = createTableAttributes(protocol, false);
        updateStyles(attributes.getStyles(), tableCellStyles);
        createTableElement(protocol,attributes);
       
        for (int i = 0; i < MOVABLE_IMAGES_TABLE_SIZE; i++) {
            createTableRowElement(protocol);
            for (int j = 0; j < MOVABLE_IMAGES_TABLE_SIZE; j++) {
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

        Map stylesMap = new HashMap();
        stylesMap.put(StylePropertyDetails.DISPLAY,DisplayKeywords.NONE);
        updateStyles(divBgAttributes.getStyles(),stylesMap);
        openDivElement(protocol, divBgAttributes);

        TableAttributes attributes = createTableAttributes(protocol, false);
        createTableElement(protocol,attributes);
        createTableRowElement(protocol);
        for (int j = 0; j < 4 * MAIN_IMAGES_TABLE_SIZE; j++) {
            createTableCellElement(protocol, idCollector, true);
            AnchorAttributes aAttributes = new AnchorAttributes();
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

     @param generateDefaultId
     *  @result tableAttributes
     */
    private TableAttributes createTableAttributes(VolantisProtocol protocol,
            boolean generateDefaultId) {
        TableAttributes tableAttributes = new TableAttributes();

        Styles styles = tableAttributes.getStyles();
        if (styles == null) {
            styles = StylingFactory.getDefaultInstance().createInheritedStyles(
                    protocol.getMarinerPageContext().getStylingEngine()
                            .getStyles(), null);
            tableAttributes.setStyles(styles);
        }
        if (generateDefaultId && tableAttributes.getId() == null) {
            tableAttributes.setId(protocol.getMarinerPageContext()
                    .generateUniqueFCID());
        }
        return tableAttributes;
    }
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.