Package org.odlabs.wiquery.core.options

Examples of org.odlabs.wiquery.core.options.Options


    return "effect";
  }

  private static CharSequence getOptions(PulsateMode mode, int times)
  {
    Options options = new Options();
    if (mode != null)
    {
      options.put("mode", JsUtils.quotes(mode.name()));
    }
    options.put("times", times);

    return options.getJavaScriptOptions();
  }
View Full Code Here


  private Options options;

  public JQueryAjaxOption()
  {
    super();
    options = new Options();
  }
View Full Code Here

  public CharSequence[] statementArgs()
  {
    CharSequence[] argsArray = new CharSequence[2];

    // First css properties
    Options opts = new Options();
    for (Entry<String, String> entry : this.properties.entrySet())
    {
      opts.putLiteral(entry.getKey(), entry.getValue());
    }
    argsArray[0] = opts.getJavaScriptOptions();

    // Now, the option properties
    opts = new Options(); // Flush

    if (getComplete() != null)
    {
      opts.put("complete", getComplete());
    }

    if (getDuration() != null)
    {
      opts.put("duration", getDuration().getJavascriptOption().toString());
    }

    if (getEasing() != null)
    {
      opts.putLiteral("easing", getEasing());
    }

    if (getStep() != null)
    {
      opts.put("step", getStep());
    }

    if (isQueue() != null)
    {
      opts.put("queue", isQueue());
    }

    if (getSpecialEasing() != null)
    {
      Options opts2 = new Options();
      for (Entry<String, String> entry : getSpecialEasing().entrySet())
      {
        opts2.putLiteral(entry.getKey(), entry.getValue());
      }
      opts.put("specialEasing", opts2.getJavaScriptOptions().toString());
    }

    argsArray[1] = opts.getJavaScriptOptions();

    return argsArray;
View Full Code Here

  @Test
  public void testCssOptions()
  {
    String expectedJavascript = "$('div').css({font-weight: 'bold'});";

    Options options = new Options();
    options.putLiteral("font-weight", "bold");
    String generatedJavascript =
      new JsStatement().$(null, "div").chain(CssHelper.css(options)).render().toString();

    log.info(expectedJavascript);
    log.info(generatedJavascript);
View Full Code Here

   * .
   */
  @Test
  public void testCssOptions()
  {
    Options options = new Options();
    options.putLiteral("font-weight", "bold");
    assertAndLog("$('span').css({font-weight: 'bold'});",
      jsStatement.$(null, "span").css(options).render());
  }
View Full Code Here

   * Default constructor
   */
  public DraggableBehavior()
  {
    super();
    options = new Options();
  }
View Full Code Here

   * Builds a new progress bar.
   */
  public ProgressBar(String id)
  {
    super(id);
    this.options = new Options(this);
    this.options.setRenderer(new UiOptionsRenderer("progressbar", this));
  }
View Full Code Here

   * Builds a new tabs container with the given wicket id.
   */
  public Tabs(String id)
  {
    super(id);
    options = new Options(this);
    tabsAjaxBehavior = new TabsAjaxBehavior()
    {

      private static final long serialVersionUID = 1L;

View Full Code Here

  @Test
  public void testCssOptions()
  {
    String expectedJavascript = "$('div').css({font-weight: 'bold'});";

    Options options = new Options();
    options.putLiteral("font-weight", "bold");
    String generatedJavascript =
      new JsStatement().$(null, "div").chain(CssHelper.css(options)).render().toString();

    log.info(expectedJavascript);
    log.info(generatedJavascript);
View Full Code Here

   * .
   */
  @Test
  public void testCssOptions()
  {
    Options options = new Options();
    options.putLiteral("font-weight", "bold");
    assertAndLog("$('span').css({font-weight: 'bold'});",
      jsStatement.$(null, "span").css(options).render());
  }
View Full Code Here

TOP

Related Classes of org.odlabs.wiquery.core.options.Options

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.