Package net.xoetrope.xui.test

Source Code of net.xoetrope.xui.test.TestStyles

package net.xoetrope.xui.test;

import junit.framework.TestCase;
import net.xoetrope.xui.XProjectManager;
import net.xoetrope.xui.style.XStyle;
import net.xoetrope.xui.style.XStyleManager;

/**
* Title:        Xui
* Description:
* Copyright:    Copyright (c) Xoetrope Ltd., 1998-2003
* Company:      Xoetrope Ltd.
* @author Xoetrope Ltd.
* @version 1.0
*/

public class TestStyles extends TestCase {

  public TestStyles()
  {
  }

  public void testStyles()
  {
    XStyleManager style = getStyles();
    assertTrue( style.getStyle("base").getStyleAsString(XStyle.FONT_FACE).compareTo("arial")==0 );
    assertTrue( style.getStyle("base").getStyleAsInt(XStyle.FONT_SIZE)==12 );
    assertTrue( style.getStyle("base/bold/XLabel").getStyleAsInt(XStyle.FONT_SIZE)==16 );

//    style = getStylesWithoutBase();
    assertTrue( style.getStyle("base/bold/XLabel").getStyleAsInt(XStyle.FONT_SIZE)==16 );

//    XStyleManager style = getStyles();
//    assertTrue( style.getStyle("base").getStyleAsString(XStyle.FONT_FACE).compareTo("arial")==0 );
//    assertTrue( style.getStyle("base").getStyleAsInt(XStyle.FONT_SIZE)==12 );
  }

  public static XStyleManager getStyles()
  {
//    XResourceManager.getInstance();
//    XResourceManager.setDefaultFile("startup.properties");
    XStyleManager manager = XProjectManager.getStyleManager();
//    XStyleFactory  styleFactory = new XStyleFactory();
    manager.load("configurator.txt");
    return XProjectManager.getStyleManager();
  }
}
TOP

Related Classes of net.xoetrope.xui.test.TestStyles

TOP
Copyright © 2018 www.massapi.com. 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.