Examples of XStyleFactory


Examples of net.xoetrope.xui.style.XStyleFactory

  }

  private Component addComponents()
  {
//    XStyleManager style = TestStyles.getStyles();
    XStyleFactory compfactory = null;
    try {
      compfactory = new XStyleFactory( project, "net.xoetrope.xui" );
    }
    catch ( Exception ex ) {
      ex.printStackTrace();
    }
    Component xpanel = (Component)compfactory.addComponent( XPage.PANEL, 0, 0, 800, 600, null, "base/grey" );
    Component xpanelc1 = (Component)compfactory.addComponent( XPage.PANEL, 10, 10, 160, 100, null, null );
    Component xpanelc2 = (Component)compfactory.addComponent( XPage.PANEL, 10, 160, 360, 160, null, null );

    /* First child panel */
    compfactory.setParentComponent(xpanelc1);
    XLabel lbl1 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 2, 80, 25, "test 1", null );
    XLabel lbl2 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 30, 80, 25, "test 2", null );

    /* Second child panel */
    compfactory.setParentComponent(xpanelc2);
    XLabel lbl3 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 2, 120, 50, "this is a piece of wrapping text", "bold" );
    XLabel lbl4 = (XLabel)compfactory.addComponent( XPage.LABEL, 10, 90, 120, 20, "test 4", "bold" );

    /* Add a generic component */
    Button b = (Button)compfactory.addComponent( XPage.BUTTON, 120, 70, 150, 35, null );
    b.setActionCommand("calculate");
    b.setLabel("Test button");
    b = (Button)compfactory.addComponent( XPage.BUTTON, 120, 110, 150, 35, null );
    b.setLabel("Click me!!!");

    return xpanel;
  }
View Full Code Here

Examples of net.xoetrope.xui.style.XStyleFactory

  }

  public void testMetaContent()
  {
    XStyleManager manager = project.getStyleManager();
    XStyleFactory styleFactory = null;

    try {
      styleFactory = new XStyleFactory( project, "net.xoetrope.xui" );
    }
    catch ( Exception ex1 ) {
      System.out.println( "No style file loaded!" );
    }
View Full Code Here

Examples of net.xoetrope.xui.style.XStyleFactory

    adapter = WidgetAdapter.getInstance();
    if ( packageName == null )
      packageName = XPage.XUI_AWT_PACKAGE;
   
    validationFactories = new Hashtable( 2 );
    componentFactory = new XStyleFactory( currentProject, packageName );
    layoutHelper = (XLayoutHelper)currentProject.getObject( "LayoutHelper" );
    XBasicDataBindingFactory.register( currentProject );
    XRegisteredDataBindingFactory.register( currentProject );
    evaluator = (XDefaultAttributeEvaluator)currentProject.getObject( "DefaultAttributeEvaluator" );
   
View Full Code Here

Examples of net.xoetrope.xui.style.XStyleFactory

  {
    if ( defPackageName == null )
      packageName = XPage.XUI_AWT_PACKAGE;
    else
      packageName = defPackageName;
    componentFactory = new XStyleFactory( currentProject, packageName );
  }
View Full Code Here

Examples of net.xoetrope.xui.style.XStyleFactory

   
    hiddenComponents = null;
    XValidationHandler validationHandler = new XValidationHandler( page );
    eventHandler = currentProject.createEventHandler( page, validationHandler );
   
    componentFactory = new XStyleFactory( currentProject, currentProject.getWidgetPackageName() );
    componentFactory.setParentComponent( page );
   
    attribs = new Hashtable();
    clearPage = true;
   
View Full Code Here
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.