Package bibliothek.gui.dock.facile.mode

Examples of bibliothek.gui.dock.facile.mode.Location


            }
          }
        }
       
          // easy solution: set the location, then change the mode
          setProperties( newMode, dockable, new Location( mode.getModeIdentifier(), root, location.findProperty() ) );
          apply( dockable, newMode, true );
      }
      else{
        apply( dockable, newMode, false );
      }
View Full Code Here


          }
         
          if( !mode.getModeIdentifier().equals( locationMode.getModeIdentifier() ))
            throw new IllegalArgumentException( "location and mode do not belong together, they do not have the same identifier" );
         
          setProperties( getMode( mode.getModeIdentifier() ), dockable, new Location( mode.getModeIdentifier(), root, property ) );
        }
        else{
          setProperties( getMode( mode.getModeIdentifier() ), dockable, null );
        }
    }
View Full Code Here

        if( mode == null )
            throw new IllegalArgumentException( "mode must not be null" );
       
        CLocationMode cmode = getMode( mode.getModeIdentifier() );
       
        Location location = getProperties( cmode, dockable );
        if( location == null )
            return null;
       
        return cmode.getCLocation( dockable, location );
    }
View Full Code Here

   
    // need to reset
    List<Location> history = getPropertyHistory( dockable.intern() );
    CLocationMode next = null;
    for( int i = history.size()-1; i >= 0 && next == null; i-- ){
      Location check = history.get( i );
      Path path = check.getMode();
      String root = check.getRoot();
      if( path != null && root != null ){
        CLocationMode mode = getMode( path );
        if( mode != null ){
          CStation<?> station = control.getOwner().getStation( root );
          if( station != null ){
View Full Code Here

    if( replacement == null ){
      return history;
    }
    else{
      if( history == null ){
        return new Location( mode.getUniqueIdentifier(), replacement.getUniqueId(), null );
      }
      else{
        return new Location( mode.getUniqueIdentifier(), replacement.getUniqueId(), history.getLocation() );
      }
    }
  }
View Full Code Here

  public void maximize( PerspectiveDockable dockable ){
    maybeDeploy();

    // find current location
    LocationModeManagerPerspective manager = perspective.getLocationManager();
    Location location = manager.getLocation( dockable );
    Path mode = null;
    if( location == null ) {
      ExtendedMode eMode = manager.getMode( dockable );
      if( eMode != null ) {
        mode = eMode.getModeIdentifier();
      }
    }
    else {
      mode = location.getMode();
    }

    // reparent if necessary
    if( dockable.getParent() != intern() ) {
      if( dockable.getParent() != null ) {
View Full Code Here

   
    // move all the items that were before dockable
    for( int i = baseIndex - 1; i >= 0; i-- ){
      currentDockable = children[i];
      currentStation = dockable.getDockParent();
      Location base = callback.getLocation( dockable );
      Location movingLocation = new Location( base.getMode(), base.getRoot(), copyAndSetStackLocation( base.getLocation(), i - baseIndex + 1 - missing ) );
      callback.setLocation( currentDockable, movingLocation );
      if( currentDockable.getDockParent() != dockable.getDockParent() ){
        missing++;
      }
    }
   
    // move all the items that were after dockable
    for( int i = baseIndex + 1; i < children.length; i++ ){
      currentDockable = children[i];
      currentStation = dockable.getDockParent();
      Location base = callback.getLocation( dockable );
      Location movingLocation = new Location( base.getMode(), base.getRoot(), copyAndSetStackLocation( base.getLocation(), i - baseIndex - missing ) );
      callback.setLocation( currentDockable, movingLocation );
      if( currentDockable.getDockParent() != dockable.getDockParent() ){
        missing++;
      }
    }
View Full Code Here

      // Store the last location of all known elements
      XElement xinvisible = root.addElement( "invisible" );
      PropertyTransformer transformer = frontend.getPropertyTransformer();
      for( String key : perspective.getDockableKeys() ){
        CDockablePerspective dockable = perspective.getDockable( key );
        Location location = getInvisibleLocation( dockable );
       
        if( location != null ){
          XElement xdockable = xinvisible.addElement( "dockable" );
        xdockable.addString( "key", key );
       
          if( dockable.getParent() == null ){
            conversion.getSituation().writeCompositionXML( conversion.convert( dockable.intern() ), xdockable.addElement( "content" ) );
          }
         
          XElement xlocation = xdockable.addElement( "location" );
          xlocation.addString( "root", location.getRoot() );
          xlocation.addString( "mode", dockable.getLocationHistory().getLastMode().getModeIdentifier().toString() );
          transformer.writeXML( location.getLocation(), xlocation );
        }
      }
     
      // store more location information
      ModeSettings<Location, ?> settings = perspective.getLocationManager().writeModes( control );
View Full Code Here

      out.writeInt( keys.length );
      PropertyTransformer transformer = frontend.getPropertyTransformer();
     
      for( String key : keys ){
        CDockablePerspective dockable = perspective.getDockable( key );
        Location location = getInvisibleLocation( dockable );
       
        if( location != null ){
          out.writeBoolean( true );
          out.writeUTF( key );
         
          if( dockable.getParent() == null ){
            out.writeBoolean( true );
            conversion.getSituation().writeComposition( conversion.convert( dockable.intern() ), out );
          }
          else{
            out.writeBoolean( false );
          }
         
          out.writeUTF( location.getRoot() );
          out.writeUTF( dockable.getLocationHistory().getLastMode().getModeIdentifier().toString() );
          transformer.write( location.getLocation(), out );
        }
        else{
          out.writeBoolean( false );
        }
      }
View Full Code Here

            DockableProperty location = transformer.readXML( xlocation );
            Path mode = new Path( xlocation.getString( "mode" ));
           
            ExtendedMode extendedMode = perspective.getLocationManager().getMode( mode );
            if( extendedMode != null ){
              dockable.getLocationHistory().add( extendedMode, new Location( mode, locationRoot, location ) );
            }
          }
        }
      }
     
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.facile.mode.Location

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.