Package com.volantis.mcs.protocols.separator

Examples of com.volantis.mcs.protocols.separator.SeparatorRenderer


    // javadoc inherited
    public SeparatorRenderer selectMenuItemGroupSeparator(
            MenuItemGroup group,
            boolean before) {
        SeparatorRenderer separator = null;

        // Explicitly targeted groups and groups within menus that are
        // performing automatic iteration allocation should not generate any
        // delimiters, so check for these cases
        if ((group.getPane() == null) &&
View Full Code Here


        return chars;
    }

    // javadoc inherited
    public SeparatorRenderer selectMenuItemSeparator(Menu menu) {
        SeparatorRenderer separator = null;

        final PropertyValues properties =
                menu.getElementDetails().getStyles().getPropertyValues();

        // Now see what separator should be used.
View Full Code Here

     */
    public MenuRenderer selectMenuRenderer(Menu menu)
            throws RendererException {

        // Get the orientation separator.
        final SeparatorRenderer orientationSeparator
                = separatorSelector.selectMenuSeparator(menu);

        // Create a menu buffer factory that will use the appropriate
        // orientation renderer.
        MenuBufferFactory bufferFactory = new ConcreteMenuBufferFactory(orientationSeparator);
View Full Code Here

            if (menuBuffer != null) {
                SeparatorManager separatorManager =
                        menuBuffer.getSeparatorManager();

                // Render the separator before.
                final SeparatorRenderer before =
                        separatorRendererSelector.selectMenuItemGroupSeparator(
                                group, true);
                if (before != null) {
                    separatorManager.queueSeparator(before);
                }

                // We always render the items in the menu group
                renderChildren(group);

                // Render the separator after.
                final SeparatorRenderer after =
                        separatorRendererSelector.selectMenuItemGroupSeparator(
                                group, false);
                if (after != null) {
                    separatorManager.queueSeparator(after);
                }
View Full Code Here

    public MenuItemRenderer selectMenuItemRenderer(Menu menu)
            throws RendererException {
        PropertyValues properties =
                menu.getElementDetails().getStyles().getPropertyValues();

        SeparatorRenderer separator;

        // Initialise the renderer to return.
        MenuItemRenderer itemRenderer = null;

        // Initialise the top component renderer.
View Full Code Here

    protected void contentTriggered(ArbitratorDecision decision) {
        makeDecision(decision);
    }

    private void makeDecision(ArbitratorDecision decision) {
        SeparatorRenderer deferredSeparator = decision.getDeferredSeparator();

        SeparatedContent previousContent = decision.getPreviousContent();
        if (previousContent == null) {

            // Ignore the separator if this is at the start.
View Full Code Here

    public void decide(SeparatorManager manager,
                       ArbitratorDecision decision) {

        SeparatedContent triggeringContent = decision.getTriggeringContent();
        SeparatorRenderer triggeringSeparator = decision.getTriggeringSeparator();

        // The trigger is determined as follows.
        // 1) If a triggering separator was specified then it was the trigger.
        // 2) If some triggering content was specified then it was the trigger.
        // 3) Otherwise it was as a result of a flush.
View Full Code Here

            decision.setTriggeringSeparator(separator);

            arbitrator.decide(this, decision);

            // If a renderer was chosen then we may have to do something.
            SeparatorRenderer chosen = decision.getChosenSeparator();
            if (chosen == null) {
                // The deferred separator was ignored so the triggering
                // separator replaces it as the deferred one.
                deferredSeparator = separator;
            } else if (decision.isDecisionDeferred()) {
View Full Code Here

            decision.setTriggeringSeparator(null);

            // Ask the arbitrator to decide whether to output a separator.
            arbitrator.decide(this, decision);

            SeparatorRenderer chosen = decision.getChosenSeparator();
            if (chosen != null) {
                renderSeparator(outputBuffer, chosen);
            }
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.separator.SeparatorRenderer

Copyright © 2018 www.massapicom. 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.