Package bibliothek.gui.dock.common.intern

Examples of bibliothek.gui.dock.common.intern.CSetting


    private CSetting convert( CPerspective perspective, boolean includeWorkingAreas ){
      perspective.storeLocations();
     
      DockFrontendPerspective frontend = conversion( perspective, includeWorkingAreas );
      Perspective conversion = frontend.getPerspective();
      CSetting setting = new CSetting();
     
      // layout
      for( String key : perspective.getStationKeys() ){
        CStationPerspective station = perspective.getStation( key );
        if( station.asDockable() == null || station.asDockable().getParent() == null ){
          setting.putRoot( key, conversion.convert( station.intern() ) );
        }
      }
     
      // invisible items (storing location of visible items as well)
      for( String key : perspective.getDockableKeys() ){
        CDockablePerspective dockable = perspective.getDockable( key );
        Location location = getInvisibleLocation( dockable );
        if( location != null ){
          setting.addInvisible( key, location.getRoot(), null, location.getLocation() );
        }
      }
     
      ModeSettings<Location, Location> settings = perspective.getLocationManager().writeModes( control );
      setting.setModes( settings );
      return setting;
    }
View Full Code Here


   * Gets the perspective which was stored using <code>name</code> as key.
   * @param name the key of the layout
   * @return the perspective or <code>null</code> if <code>name</code> was not found
   */
  public CPerspective getPerspective( String name ){
    CSetting setting = getSetting( name );
    if( setting == null ){
      return null;
    }
    return control.read( setting, false );
  }
View Full Code Here

      throw new IllegalArgumentException( "name must not be null" );
    }
    if( perspective == null ){
      throw new IllegalArgumentException( "perspective must not be null" );
    }
    CSetting setting = control.write( perspective, false );
    putSetting( name, setting );
  }
View Full Code Here

  /**
   * Gets the current layout.
   * @return the currently applied layout, may be <code>null</code>
   */
  public CPerspective getPerspective(){
    CSetting setting = getSetting();
    if( setting == null ){
      return null;
    }
    return control.read( setting, true );
  }
View Full Code Here

  /**
   * Sets the layout that should be loaded.
   * @param perspective the new layout, not <code>null</code>
   */
  public void setPerspective( CPerspective perspective ){
    CSetting setting = control.write( perspective, true );
    setSetting( setting );
  }
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.common.intern.CSetting

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.