Package bibliothek.gui.dock.common.perspective

Examples of bibliothek.gui.dock.common.perspective.CDockablePerspective


                }
                return false;
            }
            public boolean ignoreElement( PerspectiveElement element ){
              if( element instanceof CommonElementPerspective ){
                CDockablePerspective perspective = ((CommonElementPerspective)element).getElement().asDockable();
                if( perspective != null ){
                  return perspective.getWorkingArea() != null;
                }
              }
              return false;
            }
        });
View Full Code Here


     
      Iterator<PerspectiveElement> elements = perspective.elements();
      while( elements.hasNext() ){
        PerspectiveElement next = elements.next();
        if( next instanceof CommonElementPerspective ){
          CDockablePerspective dockable = ((CommonElementPerspective)next).getElement().asDockable();
          if( dockable != null ){
            String id = null;
           
            if( dockable instanceof SingleCDockablePerspective ){
              id = control.getRegister().toSingleId( ((SingleCDockablePerspective)dockable).getUniqueId() );
            }
            else if( dockable instanceof MultipleCDockablePerspective){
              id = ((MultipleCDockablePerspective)dockable).getUniqueId();
              if( id != null ){
                // id == null should never happen
                id = control.getRegister().toMultiId( id );
              }
              else{
                throw new IllegalStateException( "detected dockable with no identifier" );
              }
            }
           
            if( id != null ){
               ExtendedMode current = manager.getMode( dockable.intern().asDockable() );
               LocationHistory history = dockable.getLocationHistory();
               List<Path> order = history.getOrder();
               Map<Path, Location> locations = history.getLocations();
               modes.add( id, current == null ? null : current.getModeIdentifier(), locations, order );
            }
          }
View Full Code Here

  public void readModes( ModeSettings<Location, ?> modes, CPerspective cperspective, CControlAccess control ){
    Iterator<PerspectiveElement> elements = cperspective.elements();
      while( elements.hasNext() ){
        PerspectiveElement next = elements.next();
        if( next instanceof CommonElementPerspective ){
          CDockablePerspective dockable = ((CommonElementPerspective)next).getElement().asDockable();
          if( dockable != null ){
            String id = null;
            if( dockable instanceof SingleCDockablePerspective ){
              id = ((SingleCDockablePerspective)dockable).getUniqueId();
              id = control.getRegister().toSingleId( id );
            }
            else if( dockable instanceof MultipleCDockablePerspective ){
              id = ((MultipleCDockablePerspective)dockable).getUniqueId();
              id = control.getRegister().toMultiId( id );
            }
            if( id != null ){
              int index = modes.indexOf( id );
              if( index != -1 ){
               
                Path[] order = modes.getHistory( index );
                Map<Path, Location> locations = modes.getProperties( index );
                LocationHistory history = dockable.getLocationHistory();
                for( Path item : order ){
                  ExtendedMode mode = getMode( item );
                  if( mode == null ){
                    throw new IllegalStateException( "unknown ExtendedMode with id='" + item + "'" );
                  }
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.common.perspective.CDockablePerspective

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.