Package de.agilecoders.wicket.core.markup.html.bootstrap.behavior

Examples of de.agilecoders.wicket.core.markup.html.bootstrap.behavior.CssClassNameAppender


        Label menuItemLabel = new Label("menuLinkLabel", menuItem.getName());
        subMenuItemLink.addOrReplace(menuItemLabel);

        if (!menuItem.isEnabled()) {
            listItem.add(new CssClassNameAppender("disabled"));
        }
        if (menuItem.isPrototyping()) {
            subMenuItemLink.add(new CssClassNameAppender("btn btn-warning"));
        }
        leafItem.add(subMenuItemLink);
        listItem.add(leafItem);

        String cssClassFa = menuItem.getCssClassFa();
View Full Code Here


@Category(IntegrationTest.class)
public class BehaviorsTest extends WicketApplicationTest {

    @Test
    public void removeRemovesBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.remove(component, behavior), is(equalTo(true)));
        assertThat(component.getBehaviors().size(), is(equalTo(0)));
View Full Code Here

        assertThat(component.getBehaviors().size(), is(equalTo(0)));
    }

    @Test
    public void containsClassReturnsFalseForNotAddedBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.contains(component, CssClassNameModifier.class), is(equalTo(false)));
    }
View Full Code Here

        assertThat(Behaviors.contains(component, CssClassNameModifier.class), is(equalTo(false)));
    }

    @Test
    public void containsClassReturnsTrueForAddedBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.contains(component, CssClassNameAppender.class), is(equalTo(true)));
    }
View Full Code Here

        assertThat(Behaviors.contains(component, CssClassNameAppender.class), is(equalTo(true)));
    }

    @Test
    public void containsReturnsTrueForAddedBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.contains(component, behavior), is(equalTo(true)));
    }
View Full Code Here

        assertThat(Behaviors.contains(component, behavior), is(equalTo(true)));
    }

    @Test
    public void containsReturnsFalseForNotAddedBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Behavior behavior2 = new CssClassNameAppender("classname2");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.contains(component, behavior2), is(equalTo(false)));
    }
View Full Code Here

        assertThat(Behaviors.contains(component, behavior2), is(equalTo(false)));
    }

    @Test
    public void removeReturnsFalseForNotAddedBehavior() {
        final Behavior behavior = new CssClassNameAppender("classname");
        final Behavior behavior2 = new CssClassNameAppender("classname2");
        final Component component = new WebMarkupContainer("container");
        component.add(behavior);

        assertThat(Behaviors.remove(component, behavior2), is(equalTo(false)));
    }
View Full Code Here

        setOutputMarkupId(true);
        setOutputMarkupPlaceholderTag(true);

        BootstrapResourcesBehavior.addTo(this);

        add(new CssClassNameAppender("context-menu"));

        add(createContent("content"));
    }
View Full Code Here

     * @param markupId The component id
     */
    public ButtonListContextMenu(final String markupId, final IModel<List<? extends AbstractLink>> model) {
        super(markupId, model);

        add(new CssClassNameAppender("dropdown"));
    }
View Full Code Here

                // REFACTOR: use better way to detect first element
                if (!renderedActive) {
                    renderedActive = true;

                    item.add(new CssClassNameAppender("active"));
                }

                item.add(image, header, description, caption);
            }
        };
View Full Code Here

TOP

Related Classes of de.agilecoders.wicket.core.markup.html.bootstrap.behavior.CssClassNameAppender

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.