Package com.cedarsoft.commons.struct

Examples of com.cedarsoft.commons.struct.DefaultNode


  /**
   * Creates a new repository
   */
  public Repository() {
    //noinspection RefusedBequest
    this.rootNode = new DefaultNode( "" );
  }
View Full Code Here


    Node current = getRootNode();
    for ( String element : path.getElements() ) {
      try {
        current = findChild( current, element );
      } catch ( ChildNotFoundException ignore ) {
        DefaultNode created = new DefaultNode( element );
        current.addChild( created );
        current = created;
      }
    }
    return current;
View Full Code Here

  /**
   * Creates a new repository
   */
  public Repository() {
    //noinspection RefusedBequest
    this.rootNode = new DefaultNode( "" );
  }
View Full Code Here

    Node current = getRootNode();
    for ( String element : path.getElements() ) {
      try {
        current = findChild( current, element );
      } catch ( ChildNotFoundException ignore ) {
        DefaultNode created = new DefaultNode( element );
        current.addChild( created );
        current = created;
      }
    }
    return current;
View Full Code Here

  /**
   * Creates a new repository
   */
  public Repository() {
    //noinspection RefusedBequest
    this.rootNode = new DefaultNode( "" );
  }
View Full Code Here

    Node current = getRootNode();
    for ( String element : path.getElements() ) {
      try {
        current = findChild( current, element );
      } catch ( ChildNotFoundException ignore ) {
        DefaultNode created = new DefaultNode( element );
        current.addChild( created );
        current = created;
      }
    }
    return current;
View Full Code Here

  /**
   * Creates a new repository
   */
  public Repository() {
    //noinspection RefusedBequest
    this.rootNode = new DefaultNode( "" );
  }
View Full Code Here

    Node current = getRootNode();
    for ( String element : path.getElements() ) {
      try {
        current = findChild( current, element );
      } catch ( ChildNotFoundException ignore ) {
        DefaultNode created = new DefaultNode( element );
        current.addChild( created );
        current = created;
      }
    }
    return current;
View Full Code Here

*/
public class TwoFramesDemo {
  Node model;

  public TwoFramesDemo() {
    model = new DefaultNode( "basicGroupButtonBar" );
    model.addChild( new DefaultNode( "button0", Lookups.singletonLookup( Action.class, new GroupButtonAction( "button0" ) ) ) );
    model.addChild( new DefaultNode( "button1", Lookups.singletonLookup( Action.class, new GroupButtonAction( "button1" ) ) ) );
    model.addChild( new DefaultNode( "button2", Lookups.singletonLookup( Action.class, new GroupButtonAction( "button2" ) ) ) );
    model.addChild( new DefaultNode( "button3", Lookups.dynamicLookup( new GroupButtonAction( "button3" ), new MyBasicGroupButtonPresenter() ) ) );
    model.addChild( new DefaultNode( "button4", Lookups.singletonLookup( Action.class, new GroupButtonAction( "button4" ) ) ) );


    Node child = model.getChildren().get( 3 );
    if ( child.getLookup().lookup( Action.class ) == null ) {
      throw new IllegalStateException( "uups" );
View Full Code Here

    System.out.println( "removing child:" );
    model.detachChild( model.getChildren().get( 2 ) );
    Thread.sleep( 2000 );

    System.out.println( "Adding child" );
    model.addChild( 1, new DefaultNode( "newButton", Lookups.singletonLookup( Action.class, new GroupButtonAction( "newButton" ) ) ) );
  }
View Full Code Here

TOP

Related Classes of com.cedarsoft.commons.struct.DefaultNode

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.