Package limelight.styles.abstrstyling

Examples of limelight.styles.abstrstyling.StyleValue


  }

  @Test
  public void validValue() throws Exception
  {
    StyleValue attr = compiler.compile("123");

    assertEquals(123, ((SimpleIntegerValue)attr).getValue());
  }
View Full Code Here


  }

  @Test
  public void testValidValue() throws Exception
  {
    StyleValue attr = compiler.compile("red");

    assertEquals(Color.red, ((SimpleColorValue)attr).getColor());
  }
View Full Code Here

  }

  @Test
  public void usingClojureStyleKeyword() throws Exception
  {
    StyleValue attr = compiler.compile(new FakeKeyword("blue"));

    assertEquals(Color.blue, ((SimpleColorValue)attr).getColor());
  }
View Full Code Here

  }

  @Test
  public void validValue() throws Exception
  {
    StyleValue attr = compiler.compile("123");
    assertEquals(123, ((SimpleDegreesValue)attr).getDegrees());

    attr = compiler.compile(":123");
    assertEquals(123, ((SimpleDegreesValue)attr).getDegrees());
  }
View Full Code Here

  public StyleValue get(int key)
  {
    if(screen != null)
    {
      StyleValue value = screen.get(key);
      if(value != null)
        return value;
    }

    return super.get(key);
View Full Code Here

  private void applyChangesFromScreen(Style screen, boolean in)
  {
    for(StyleAttribute attribute : STYLE_LIST)
    {
      StyleValue value = screen.get(attribute.index);
      StyleValue originalValue = getCompiled(attribute);
      if(value != null && !value.equals(originalValue))
      {
        if(in)
          notifyObserversOfChange(attribute, value);
        else
View Full Code Here

  public void put(StyleAttribute attribute, Object value)
  {
    if(value == null)
      return;
    StyleValue compiledValue = attribute.compile(value);
    putCompiled(attribute, compiledValue);
  }
View Full Code Here

  }

  @Override
  protected void putCompiled(StyleAttribute attribute, StyleValue compiledValue)
  {
    StyleValue originalValue = styles[attribute.index];
    if(!Util.equal(originalValue, compiledValue))
    {
      styles[attribute.index] = compiledValue;
      notifyObserversOfChange(attribute, compiledValue);
    }
View Full Code Here

  {
    LinkedList<RichStyle> seniorExtensions = findSeniorExtensions(style);

    for(StyleAttribute attribute : STYLE_LIST)
    {
      StyleValue value = style.get(attribute.index);
      if(value != null && getFrom(seniorExtensions, attribute.index) == null)
        styleChanged(attribute, value);
    }
  }
View Full Code Here

  private StyleValue getFrom(LinkedList<RichStyle> extensions, int key)
  {
    for(Style style : extensions)
    {
      StyleValue value = style.get(key);
      if(value != null)
        return value;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of limelight.styles.abstrstyling.StyleValue

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.