Examples of LabelAttributes


Examples of com.volantis.mcs.papi.LabelAttributes

     *
     * @return the required type of attributes
     * @todo later this might want to go into the base PAPI test abstract (with return type and accessibility changes)
     */
    private BlockAttributes createAttributes() {
        return new LabelAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.papi.LabelAttributes

    // javadoc inherited
    protected int exprElementStart(
            MarinerRequestContext context,
            PAPIAttributes papiAttributes)
            throws PAPIException {
        LabelAttributes attributes = (LabelAttributes) papiAttributes;

        // A new output buffer is required to capture the content of the label
        // element (the content model indicates the use of "phrase" group
        // elements and text)
        // NB: The allocation mechanism must be compatible with the
        //     de-allocation mechanism used in
        //     {@link MenuElement#releaseLabelOutputBuffers}
        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);

        content = pageContext.getProtocol().
                getOutputBufferFactory().createOutputBuffer();

        pageContext.pushOutputBuffer(content);

        try {
            MenuModelBuilder builder = pageContext.getMenuBuilder();

            String title = attributes.getTitle();

            // Action the builder to construct the label in the menu model
            builder.startLabel();

            // Set the stylistic information in the model for this element.
            MenuInternals.setElementDetails(builder, attributes,
                    pageContext.getStylingEngine().getStyles());

            // The label has events, style and pane, so handle these
            MenuInternals.setEvents(builder, attributes, pageContext);

            // Set the pane attribute
            MenuInternals.setPane(builder, attributes.getPane(), pageContext);

            // Handle the title
            if (title != null) {
                builder.setTitle(title);
            }
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.