Package net.xoetrope.xui.test

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

package net.xoetrope.xui.test;

import java.awt.Container;
import java.util.Hashtable;

import junit.framework.TestCase;
import net.xoetrope.awt.XApplet;
import net.xoetrope.xui.PageSupport;
import net.xoetrope.xui.XContentHolder;
import net.xoetrope.xui.XPage;
import net.xoetrope.xui.XPageDisplay;
import net.xoetrope.xui.XPageManager;
import net.xoetrope.xui.XProject;
import net.xoetrope.xui.XTarget;
import net.xoetrope.xui.XProjectManager;

/** These test are mostly meaningless!
* Title:        XUI
* Description:
* Copyright (c) Xoetrope Ltd., 1998-2004
* @version 1.0
*/
public class TestXPageManager extends TestCase implements XPageDisplay
{
  private XProject project;
  private XPageManager pageMgr;
 
  public TestXPageManager()
  {
    XApplet applet = new XApplet();
    project = XProjectManager.getCurrentProject( applet );
  }

  public void testLoadPage()
  {
    XApplet testApplet = new XApplet();
    pageMgr = XProjectManager.getPageManager();
    pageMgr.setPackageName( "net.xoetrope.xui.test." );
    pageMgr.showPage( "PageTester" );
  }

  public XPage displayPage( XPage page )
  {
    System.out.println( page.getName() );
    return null;
  }

  public XPage displayPage( XPage page, String target )
  {
    System.out.println( "Page: " + page.getName() + ", target: " + target );
    return null;
  }

  /**
   * Adds a frame to the frameset
   * @param frame the new traget frame
   * @param constraint the BorderLayout constraint
   */
  public void addTarget( XTarget frame, Object constraint )
  {
    System.out.println( "addTarget: " + frame.getName() + ", " + constraint.toString());
  }

  /**
   * Get a named frame/target from the current frameset
   * @param name the name of the frame
   * @return the target frame
   */
  public Container findTarget( String name )
  {
    System.out.println( "findTarget: " + name );
    return null;
  }

  /**
   * Get the number of frame/target from the current frameset
   * @return the number of target frames
   */
  public int getNumTargets()
  {
    System.out.println( "getNumTargets " );
    return 0;
  }

  /**
   * Get the target for a page display request
   * @param idx the target area
   * @return the container to be updated
   */
  public Container getTarget( int idx )
  {
    System.out.println( "getTarget: " + idx );
    return null;
  }

  public void doLayout()
  {
  }

  public Object displayPage(PageSupport page)
  {
    return null;
  }

  public Object displayPage(PageSupport page, String target)
  {
    return null;
  }

  public Object displayPage(PageSupport page, String target, Object attributes)
  {
    return null;
  }

  public Object displayDecoration(PageSupport page, String constraint)
  {
    return null;
  }

  public XContentHolder addTarget(String name, Object constraint, int preferredWidth, int preferredHeight, Hashtable params)
  {
    return null;
  }

  public void removeAllTargets()
  {
  }

  public void setupFrameset(Hashtable params)
  {
  }
}
TOP

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

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.