Package org.wicketstuff.yui.helper

Examples of org.wicketstuff.yui.helper.Attributes


    YuiMenu menu = new YuiMenu("menu")
    {
      @Override
      protected String getOpts()
      {
        Attributes attributes = new Attributes();
        attributes.add(new Attributes("visible", true));
        attributes.add(new Attributes("clicktohide", false));
        attributes.add(new Attributes("fixedcenter", true));
        return attributes.toString();
      }
    };


    menu.addMenuItem(new TestAction("M : L1"));
View Full Code Here


  }

  protected String carouselOpts()
  {
    // or simply {}
    Attributes attributes = new Attributes();

    // animation - animation : {speed : 0.5}
    attributes.add(new Attributes("animation", new Attributes("speed", 0.5F)));

    // circular
    attributes.add(new Attributes("isCircular", "true"));

    // num visible
    attributes.add(new Attributes("numVisible", 1));

    // reveal amount
    attributes.add(new Attributes("revealAmount", 0));

    // vertical
    // attributes.add(new Attributes("isVertical", "true"));

    // navigation - currently needs a patch
    // attributes.add(new Attributes("navigation", new
    // Attributes("prev", "myPrev").add("next", "myNext")
    // .toString()));

    return attributes.toString();
  }
View Full Code Here

    }
   
    @Override
    public YuiAnimEffect onselectEffect()
    {
      Attributes attributes = new Attributes();
      attributes.add(SHOW_ATTRIBUTE);
      attributes.add(new Attributes("width", 0, getSettings().getPictureWidth()));
      attributes.add(new Attributes("height", 0, getSettings().getPictureHeight()));
      attributes.add(new Attributes("left", 0, getSettings().getPictureLeft()));
      attributes.add(new Attributes("top", 0, getSettings().getPictureTop()));
      attributes.add(new Attributes("opacity", 0, 1));
     
      return new YuiAnim(YuiAnimEffect.Type.Anim, attributes, 1, YuiEasing.bounceIn)
    }
View Full Code Here

    }
   
    @Override
    public YuiAnimEffect onunselectEffect()
    {
      Attributes attributes = new Attributes();
      attributes.add(HIDE_ATTRIBUTE);
      attributes.add(new Attributes("width", getSettings().getPictureWidth(), 0));
      attributes.add(new Attributes("height", getSettings().getPictureHeight(), 0));
      attributes.add(new Attributes("left", getSettings().getPictureLeft(), 0));
      attributes.add(new Attributes("top", getSettings().getPictureTop(), 0));
      attributes.add(new Attributes("opacity", 0.6f, 0f));
     
      return new YuiAnim(YuiAnimEffect.Type.Anim, attributes, 1, YuiEasing.bounceOut);
    }
View Full Code Here

    // Shadow Fade Appear ShakeLR ShakeTB
    newAnimatedComponent("shadow", OnEvent.click, YuiEffect.Type.Shadow, true); // needs
    // position:relative

    // Attributes
    Attributes delay = new Attributes("delay", "true");

    // Appear
    newAnimatedComponent("appear", OnEvent.click, YuiEffect.Type.Appear, false);
    newAnimatedComponent("shakelr", OnEvent.click, YuiEffect.Type.ShakeLR, true); // needs
    // position:relative
    newAnimatedComponent("shaketb", OnEvent.click, YuiEffect.Type.ShakeTB, true); // needs
    // position:relative

    // fade followed by appear
    newAnimatedComponent("fade", OnEvent.click, YuiEffect.Type.Fade, true);
    newAnimatedComponent("drop", OnEvent.click, YuiEffect.Type.Drop, true);

    // TV
    WebMarkupContainer tv;
    add(tv = new WebMarkupContainer("tv"));
    tv.add(new YuiAnimation(OnEvent.click).addEffect(new YuiEffect(YuiEffect.Type.TV, delay))
        .addEffect(new YuiEffect(YuiEffect.Type.Appear)));

    // mouse over
    newAnimatedComponent("fade_mouseover", OnEvent.mouseover, YuiEffect.Type.Fade, true);

    // Blind Up / Down + attributes...
    Attributes ghost_attr = delay.add(new Attributes("ghost", "true"));
    Attributes easing = new Attributes("ease", YuiEasing.elasticBoth.constant());

    WebMarkupContainer ghost;
    add(ghost = new WebMarkupContainer("ghost"));
    ghost.add(new YuiAnimation(OnEvent.click).addEffect(
        new YuiEffect(YuiEffect.Type.BlindUp, ghost_attr)).addEffect(
        new YuiEffect(YuiEffect.Type.BlindDown, easing)));


    // Batch Blind Up / Down / Right / Drop / Appear
    WebMarkupContainer batch;
    add(batch = new WebMarkupContainer("batch"));
    batch.add(new YuiAnimation(OnEvent.click).addEffect(
        new YuiEffect(YuiEffect.Type.BlindUp, delay)).addEffect(
        new YuiEffect(YuiEffect.Type.BlindDown)).addEffect(
        new YuiEffect(YuiEffect.Type.BlindRight, delay)).addEffect(
        new YuiEffect(YuiEffect.Type.Drop)).addEffect(
        new YuiEffect(YuiEffect.Type.Appear, delay)));

    // Blind
    newAnimatedComponent("blindup", OnEvent.click, YuiEffect.Type.BlindUp, true);
    newAnimatedComponent("blinddown", OnEvent.click, YuiEffect.Type.BlindDown, true);
    newAnimatedComponent("blindleft", OnEvent.click, YuiEffect.Type.BlindLeft, true);
    newAnimatedComponent("blindright", OnEvent.click, YuiEffect.Type.BlindRight, true);

    // Blind Right + with attributes
    WebMarkupContainer blindright;
    add(blindright = new WebMarkupContainer("blindright_binded"));

    // set up attributes
    Attributes blindrightAttributes = new Attributes("bind", "right");
    blindrightAttributes.add(delay);
    blindright.add(new YuiAnimation(OnEvent.click).addEffect(
        new YuiEffect(YuiEffect.Type.BlindRight, blindrightAttributes)).addEffect(
        new YuiEffect(YuiEffect.Type.Appear, delay)));

    // Click for Info ...
View Full Code Here

  private Component newAnimatedComponent(String id, OnEvent onEvent, YuiEffect.Type effectType,
      boolean delay)
  {
    WebMarkupContainer comp;
    comp = new WebMarkupContainer(id);
    Attributes attributes = new Attributes();

    if (delay)
    {
      attributes.add("delay", "true");
    }

    add(comp);
    comp.add(new YuiAnimation(onEvent).addEffect(new YuiEffect(effectType, attributes))
        .addEffect(new YuiEffect(YuiEffect.Type.Appear)));
View Full Code Here

    mb = new YuiMenuBar("menuBar")
    {
      @Override
      protected String getOpts()
      {
        Attributes attributes = new Attributes();
        attributes.add(new Attributes("visible", true));
        attributes.add(new Attributes("clicktohide", true));
        attributes.add(new Attributes("autosubmenudisplay", true));
        attributes.add(new Attributes("hidedelay", 5000));
        // attributes.add(new Attributes("lazyload", true));
        attributes.add(new Attributes("effect",
            "{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}"));
        return attributes.toString();
      }
    };
    mb.setOutputMarkupId(true);

    YuiMenuBarItem firstMenu = mb.addMenu("First Menu");
View Full Code Here

   * @return
   */
  protected String getOpts()
  {
    // or simply {}
    Attributes attributes = new Attributes();
    // animation - animation : {speed : 0.5}
    attributes.add(new Attributes("animation", new Attributes("speed", 0.5F).toString()));
    // circular
    attributes.add(new Attributes("isCircular", "true"));
    // num Visible
    attributes.add(new Attributes("numVisible", 1));
    return attributes.toString();
  }
View Full Code Here

    return item == null ? null : (YuiMenuBarItem)item.getModelObject();
  }

  protected String getOpts()
  {
    Attributes attributes = new Attributes();
    attributes.add(new Attributes("visible", true));
    attributes.add(new Attributes("clicktohide", false));
    attributes.add(new Attributes("autosubmenudisplay", true));
    attributes.add(new Attributes("hidedelay", 5000));
    attributes.add(new Attributes("lazyload", true));
    return attributes.toString();
  }
View Full Code Here

  }

  @Override
  public YuiAnimEffect mouseoverEffect()
  {
    Attributes attributes = new Attributes();
    attributes.add(SHOW_ATTRIBUTE);
    attributes.add(new Attributes("opacity", 0, getSettings().getOpacity()));
    return new YuiAnim(YuiAnimEffect.Type.Anim, attributes, 0, YuiEasing.easeNone)
  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.yui.helper.Attributes

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.