Package bibliothek.gui.dock.layout

Examples of bibliothek.gui.dock.layout.PropertyTransformer


     
      conversion.getSituation().writeCompositionsXML( stations, root.addElement( "stations" ) );
     
      // 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


      conversion.getSituation().writeCompositions( stations, out );
     
      // Store the last location of all known elements
      String[] keys = perspective.getDockableKeys();
      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

      perspective.storeLocations();
     
      // read the last known location of all elements
      XElement xinvisible = root.getElement( "invisible" );
      if( xinvisible != null ){
        PropertyTransformer transformer = frontend.getPropertyTransformer();
        for( XElement xdockable : xinvisible.getElements( "dockable" )){
          String key = xdockable.getString( "key" );
          CDockablePerspective dockable = perspective.getDockable( key );
          if( dockable == null ){
            XElement xcontent = xdockable.getElement( "content" );
            if( xcontent != null ){
              PerspectiveElement element = conversion.convert( conversion.getSituation().readCompositionXML( xcontent ) );
                if( element instanceof CommonElementPerspective ){
                  dockable = ((CommonElementPerspective)element).getElement().asDockable();
                  if( dockable != null ){
                    perspective.putDockable( dockable );
                  }
                }   
            }
          }
          if( dockable != null ){
            XElement xlocation = xdockable.getElement( "location" );
            String locationRoot = xlocation.getString( "root" );
            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

        }
      }
     
      if( version111a ){
        perspective.storeLocations();
        PropertyTransformer transformer = frontend.getPropertyTransformer();
        for( int i = 0, n = in.readInt(); i<n; i++ ){
          if( in.readBoolean() ){
            String key = in.readUTF();
            DockLayoutComposition composition = null;
            if( in.readBoolean() ){
               composition = conversion.getSituation().readComposition( in );
            }
           
            CDockablePerspective dockable = perspective.getDockable( key );
            if( dockable == null && composition != null ){
              PerspectiveElement element = conversion.convert( composition );
                if( element instanceof CommonElementPerspective ){
                  dockable = ((CommonElementPerspective)element).getElement().asDockable();
                  if( dockable != null ){
                    perspective.putDockable( dockable );
                  }
                }   
            }
           
            String locationRoot = in.readUTF();
            String modeId = in.readUTF();
            DockableProperty location = transformer.read( in );
           
            if( dockable != null ){
              Path mode = new Path( modeId );
             
              ExtendedMode extendedMode = perspective.getLocationManager().getMode( mode );
View Full Code Here

    /**
     * Creates a new converter.
     * @param controller the controller in whose realm settings need to be converted
     */
    public LocationSettingConverter( DockController controller ){
      transformer = new PropertyTransformer( controller );
    }
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.layout.PropertyTransformer

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.