Package org.odlabs.wiquery.core.options

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


    {
      sequence = booleanParam.toString();
    }
    else if (selectorParam != null)
    {
      sequence = new LiteralOption(selectorParam).toString();
    }
    else
    {
      throw new IllegalArgumentException("The DraggableSnap must have one not null parameter");
    }
View Full Code Here


  @Override
  public CharSequence getJavascriptOption()
  {
    if (wantIcons != null)
      return wantIcons.toString();
    return "{'header': " + new LiteralOption(headerClass) + ", 'activeHeader': "
      + new LiteralOption(activeHeaderClass) + "}";
  }
View Full Code Here

    if (handles != null && handles instanceof ResizableHandles)
    {
      return (ResizableHandles) handles;
    }

    return new ResizableHandles(new LiteralOption("e,s,se"));
  }
View Full Code Here

      @Override
      public List<String> getValues(String term) {
        List<String> values = new ArrayList<String>(AUTOCOMPLETE_SOURCE.length);
        for (IListItemOption option : AUTOCOMPLETE_SOURCE) {
          if (option instanceof LiteralOption) {
            LiteralOption literal = (LiteralOption) option;
            if (literal.getValue().toLowerCase().contains(term.toLowerCase())) {
              values.add(literal.getValue());
            }
          }
        }
        return values;
      }
View Full Code Here

      {
        sb.append(offsetTop > 0 ? "+" + offsetTop : offsetTop).append(offsetTopPa ? "%" : "");
      }
    }

    return new LiteralOption(sb.toString()).toString();
  }
View Full Code Here

    log.info(expectedJavascript);
    log.info(generatedJavascript);
    assertEquals(generatedJavascript, expectedJavascript);

    // Literal param
    header.setLiteralParam(new LiteralOption("> li > :first-child,> :not(li):even"));
    expectedJavascript = "'> li > :first-child,> :not(li):even'";
    generatedJavascript = header.getJavascriptOption().toString();

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

    log.info(expectedJavascript);
    log.info(generatedJavascript);
    assertEquals(generatedJavascript, expectedJavascript);

    // Literal param
    handles.setLiteralParam(new LiteralOption("e, s, se"));
    expectedJavascript = "'e, s, se'";
    generatedJavascript = handles.getJavascriptOption().toString();

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

    // Literal param
    String expectedJavascript = "'#test'";
    String generatedJavascript = containment.getJavascriptOption().toString();

    // Selector param
    containment.setSelector(new LiteralOption("#test"));
    expectedJavascript = "'#test'";
    generatedJavascript = containment.getJavascriptOption().toString();

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

   */
  @Test
  public void testGetAlsoResizeComplex()
  {
    assertNull(resizableBehavior.getAlsoResizeComplex());
    resizableBehavior.setAlsoResize(new ResizableAlsoResize(new LiteralOption("div")));
    assertNotNull(resizableBehavior.getAlsoResizeComplex());
    assertEquals(resizableBehavior.getAlsoResizeComplex().getJavascriptOption().toString(),
      "'div'");
  }
View Full Code Here

  @Test
  public void testGetHandles()
  {
    assertNotNull(resizableBehavior.getHandles());
    assertEquals(resizableBehavior.getHandles().getJavascriptOption().toString(), "'e,s,se'");
    resizableBehavior.setHandles(new ResizableHandles(new LiteralOption("e,s")));
    assertEquals(resizableBehavior.getHandles().getJavascriptOption().toString(), "'e,s'");
  }
View Full Code Here

TOP

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

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.