Package bibliothek.gui.dock.perspective

Examples of bibliothek.gui.dock.perspective.PerspectiveStation


      CDockablePerspective cdockable = ((CommonElementPerspective)dockable).getElement().asDockable();
      if( cdockable.getWorkingArea() == this ){
        cdockable.setWorkingArea( null );
      }
    }
    PerspectiveStation station = dockable.asStation();
    if( station != null ){
      for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
        remove( station.getDockable( i ));
      }
    }
  }
View Full Code Here


      CDockablePerspective cdockable = ((CommonElementPerspective)dockable).getElement().asDockable();
      if( cdockable.getWorkingArea() == null ){
        cdockable.setWorkingArea( this );
      }
    }
    PerspectiveStation station = dockable.asStation();
    if( station != null ){
      for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
        add( station.getDockable( i ));
      }
    }
  }
View Full Code Here

 
  public CStationPerspective getParent(){
    PerspectiveDockable dockable = intern().asDockable();
   
    while( dockable != null ){
      PerspectiveStation parent = dockable.getParent();
      if( parent == null ){
        return null;
      }
      if( parent instanceof CommonElementPerspective ){
        CElementPerspective cparent = ((CommonElementPerspective)parent).getElement();
        CStationPerspective station = cparent.asStation();
        if( station != null ){
          return station;
        }
      }
      dockable = parent.asDockable();
    }
   
    return null;
  }
View Full Code Here

      if( perspective != null ){
        perspective.storeLocation( this );
      }
    }
   
    PerspectiveStation parent = intern().asDockable().getParent();
    if( parent != null ){
      parent.remove( intern().asDockable() );
    }
  }
View Full Code Here

      while( stack.size() > 0 ){
        ElementFrame top = stack.peek();
        if( top.offset < top.items.length ){
          PerspectiveElement result = top.items[top.offset++];
         
          PerspectiveStation station = result.asStation();
          if( station != null ){
            PerspectiveElement[] children = new PerspectiveElement[ station.getDockableCount() ];
            for( int i = 0; i < children.length; i++ ){
              children[ i ] = station.getDockable( i );
            }
            stack.addFirst( new ElementFrame( children ) );
          }
         
          return result;
View Full Code Here

    int count = getDockableCount();
    if( count > 1 ){
      return this;
    }
   
    PerspectiveStation parent = getParent();
   
    if( count == 1 ){
      PerspectiveDockable result = getDockable( 0 );
      if( parent != null ){
        parent.replace( this, result );
        return result;
      }
      else{
        remove( 0 );
        return result;
      }
    }
    else{
      if( parent != null ){
        parent.remove( this );
        return null;
      }
      else{
        return null;
      }
View Full Code Here

      for( LocationModePerspective mode : modes.values() ){
        if( mode.isCurrentMode( dockable )){
          return mode.getIdentifier();
        }
      }
      PerspectiveStation parent = dockable.getParent();
      dockable = parent == null ? null : parent.asDockable();
    }
    return null;
  }
View Full Code Here

   * @param dockable some element whose root-station is searched
   * @return the root-station or <code>null</code> if not found
   */
  public CStationPerspective getRoot( PerspectiveDockable dockable ){
    while( dockable != null ){
      PerspectiveStation parent = dockable.getParent();
      if( parent == null ){
        return null;
      }
      if( parent instanceof CommonElementPerspective ){
        CStationPerspective station = ((CommonElementPerspective)parent).getElement().asStation();
        if( perspective.getStation( station.getUniqueId() ) != null ){
          return station;
        }
      }
      dockable = parent.asDockable();
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.perspective.PerspectiveStation

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.