Package limelight.styles.values

Examples of limelight.styles.values.SimpleIntegerValue


      if(value instanceof Number)
        intValue = ((Number)value).intValue();
      else
        intValue = convertToInt(stringify(value));

      return new SimpleIntegerValue(intValue);
    }
    catch(Exception e)
    {
      throw makeError(value);
    }
View Full Code Here


  private NoneableValue<SimpleIntegerValue> fifty;

  public void setUp() throws Exception
  {
    none = new NoneableValue<SimpleIntegerValue>(null);
    fifty = new NoneableValue<SimpleIntegerValue>(new SimpleIntegerValue(50));
  }
View Full Code Here

  {
    assertEquals(true, none.equals(none));
    assertEquals(true, none.equals(new NoneableValue<SimpleIntegerValue>(null)));
    assertEquals(false, none.equals(fifty));
    assertEquals(true, fifty.equals(fifty));
    assertEquals(true, fifty.equals(new NoneableValue<SimpleIntegerValue>(new SimpleIntegerValue(50))));
    assertEquals(false, none.equals(null));
  }
View Full Code Here

  @Before
  public void setUp() throws Exception
  {
    panel = new MockChangeablePanel();
    attribute = new StyleAttribute("NAME", new IntegerAttributeCompiler(), new SimpleIntegerValue(50));
    Context.instance().bufferedImageCache = new SimpleCache<Panel, BufferedImage>();
  }
View Full Code Here

  @Test
  public void shouldExpireBufferedImageCacheByDefaultWhenStyleChange() throws Exception
  {
    Context.instance().bufferedImageCache.cache(panel, new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB));

    attribute.applyChange(panel, new SimpleIntegerValue(25));

    assertEquals(null, Context.instance().bufferedImageCache.retrieve(panel));
  }
View Full Code Here

  @Test
  public void shouldMarkAsDirtyByDefaultWhenStyleChanged() throws Exception
  {
    assertEquals(false, panel.markedAsDirty);

    attribute.applyChange(panel, new SimpleIntegerValue(25));

    assertEquals(true, panel.markedAsDirty);
  }
View Full Code Here

TOP

Related Classes of limelight.styles.values.SimpleIntegerValue

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.