Examples of DivAttributes


Examples of com.volantis.mcs.protocols.DivAttributes

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

        final VolantisProtocol protocol = getProtocol();

View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     * @throws ProtocolException
     */
    private String renderMainArea(VolantisProtocol protocol, List idCollector)
            throws ProtocolException {
        String mainDivId;
        DivAttributes divAttributes;
        divAttributes = createDivAttributes(protocol, null, true);
        mainDivId = divAttributes.getId();
        Map stylesMap = new HashMap();

        stylesMap.put(StylePropertyDetails.WIDTH,
            STYLE_VALUE_FACTORY.getLength(null, 3 * this.imageSizePx, LengthUnit.PX));
        stylesMap.put(StylePropertyDetails.HEIGHT,
            STYLE_VALUE_FACTORY.getLength(null, 3 * this.imageSizePx, LengthUnit.PX));
        stylesMap.put(StylePropertyDetails.DISPLAY,DisplayKeywords.NONE);
       
        updateStyles(divAttributes.getStyles(),stylesMap);       
        openDivElement(protocol, divAttributes);
       
        divAttributes = createDivAttributes(protocol, null, true);
        mainDivId = divAttributes.getId();
        stylesMap.clear();
       
        //be aware that it is not respected on Opera, IE, netFront
        //it must be set in javascript
        stylesMap.put(StylePropertyDetails.POSITION, PositionKeywords.ABSOLUTE);
       
        stylesMap.put(StylePropertyDetails.DISPLAY,DisplayKeywords.NONE);
       
        updateStyles(divAttributes.getStyles(),stylesMap);
       
        openDivElement(protocol);
        openDivElement(protocol, divAttributes);

        TableAttributes attributes = createTableAttributes(protocol, false);
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     */
    private String renderMovableArea(VolantisProtocol protocol, List idCollector)
            throws ProtocolException {
        String movableDivId;
        // outer div
        DivAttributes divOuterAttributes = createDivAttributes(protocol, null,
                true);
        Map stylesMap = new HashMap();
        stylesMap.put(StylePropertyDetails.DISPLAY,DisplayKeywords.NONE);
        stylesMap.put(StylePropertyDetails.OVERFLOW, OverflowKeywords.HIDDEN);
        stylesMap.put(StylePropertyDetails.HEIGHT,
            STYLE_VALUE_FACTORY.getLength(null, MAIN_IMAGES_TABLE_SIZE * this.imageSizePx,LengthUnit.PX));
        stylesMap.put(StylePropertyDetails.WIDTH,
            STYLE_VALUE_FACTORY.getLength(null, MAIN_IMAGES_TABLE_SIZE * this.imageSizePx,LengthUnit.PX));
        updateStyles(divOuterAttributes.getStyles(),stylesMap);
        movableDivId = divOuterAttributes.getId();
        openDivElement(protocol, divOuterAttributes);
        // inner div that moves inside outer div
        DivAttributes divInnerAttributes = createDivAttributes(protocol, null,
                true);
        stylesMap = new HashMap();
        stylesMap.put(StylePropertyDetails.POSITION,PositionKeywords.RELATIVE);
        stylesMap.put(StylePropertyDetails.TOP,
            STYLE_VALUE_FACTORY.getLength(null, -1 * this.imageSizePx, LengthUnit.PX));
        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);
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     * @param idCollector
     * @throws ProtocolException
     */
    private void renderBgArea(VolantisProtocol protocol, List idCollector)
            throws ProtocolException {
        DivAttributes divBgAttributes = createDivAttributes(protocol, null,
                true);
        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);
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

            initialise(attributes);
            DOMOutputBuffer dom = (DOMOutputBuffer) buffer;

            // open the div
            DivAttributes da = new DivAttributes();
            da.copy(attributes);

            // Make sure that the display value is block, rather than the
            // default for xfsi/muselect which is inline.
            Styles styles = da.getStyles();
            MutablePropertyValues propertyValues = styles.getPropertyValues();
            propertyValues.setComputedValue(StylePropertyDetails.DISPLAY,
                    DisplayKeywords.BLOCK);

            da.setId(attributes.getId());
            openDiv(dom, da);

            // render any options
            renderOptions(dom);
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

        currentBuffer.writeText(messageLocalizer
                .format("widget-wizard-cancel-dialog"));
        closeDivElement(protocol);

        // Open div for buttons
        DivAttributes divAttrs = new DivAttributes();
        divAttrs.setStyles(createCancelDialogButtonsDivStyles(protocol));
        openDivElement(protocol, divAttrs);
       
        // add first dialog button - yes
        DismissAttributes dismissAttributes = new DismissAttributes();
        dismissAttributes.setType("yes");
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     *
     * @param attributes the pane attributes.
     * @return newly created div attributes from the pane attributes.
     */
    private DivAttributes createDivAttributes(PaneAttributes attributes) {
        DivAttributes divAttributes = new DivAttributes();
        divAttributes.copy(attributes);
        return divAttributes;
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     * DivAttributes
     */
    public void checkAnnotatedAttributes(MenuBracketingRenderer renderer)
            throws NoSuchFieldException{

        DivAttributes attributes = (DivAttributes)PrivateAccessor.getField(
                renderer, "attributes");
        assertNotNull("MCS Attributes should not be null", attributes);
        Styles styles = attributes.getStyles();

        assertNotNull("The Styles on the MCS Attributes must not be null",
                styles);
        assertEquals("The styles on the MCS Attributes must be the same " +
                "as the styles on the ElementDetails",
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

     */
    private RegionInstance anonymousRegionInstance;

    public BodyElement(XDIMEContextInternal context) {
        super(XHTML2Elements.BODY, StyledStrategy.STRATEGY, context);
        protocolAttributes = new DivAttributes();
        canvasAttributes = new CanvasAttributes();

        events.registerEvents(eventMapper);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.DivAttributes

        LocalizationFactory.createExceptionLocalizer(DivElement.class);

    public DivElement(XDIMEContextInternal context) {
        super(XHTML2Elements.DIV, context);

        protocolAttributes = new DivAttributes();
    }
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.