Package bibliothek.gui.dock.perspective

Examples of bibliothek.gui.dock.perspective.PerspectiveElement


     
      Map<String, DockLayoutComposition> stations = conversion.getSituation().readCompositionsXML( xstations );
      factory.setStations( stations );
     
      for( DockLayoutComposition composition : stations.values() ){
        PerspectiveElement station = conversion.convert( composition );
        if( station instanceof CommonElementPerspective ){
          CStationPerspective stationPerspective = ((CommonElementPerspective)station).getElement().asStation();
          if( stationPerspective != null ){
            perspective.addStation( stationPerspective );
          }
        }
      }
     
      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 );
                  }
View Full Code Here


     
      Map<String, DockLayoutComposition> stations = conversion.getSituation().readCompositions( in );
      factory.setStations( stations );
     
      for( DockLayoutComposition composition : stations.values() ){
        PerspectiveElement station = conversion.convert( composition );
        if( station instanceof CommonElementPerspective ){
          CStationPerspective stationPerspective = ((CommonElementPerspective)station).getElement().asStation();
          if( stationPerspective != null ){
            perspective.addStation( stationPerspective );
          }
        }
      }
     
      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 );
                  }
View Full Code Here

      }
     
      factory.setStations( stations );
     
      for( DockLayoutComposition composition : stations.values() ){
        PerspectiveElement station = conversion.convert( composition );
        if( station instanceof CommonElementPerspective ){
          CStationPerspective stationPerspective = ((CommonElementPerspective)station).getElement().asStation();
          if( stationPerspective != null ){
            cperspective.addStation( stationPerspective );
          }
        }
      }
     
      // invisible dockables
      for( int i = 0, n = setting.getInvisibleCount(); i < n; i++ ){
        DockLayoutComposition composition = setting.getInvisibleLayout( i );
        if( composition != null ){
          PerspectiveElement element = conversion.convert( composition );
          if( element instanceof CommonElementPerspective ){
            CDockablePerspective dockable = ((CommonElementPerspective)element).getElement().asDockable();
            if( dockable != null ){
              DockableProperty location = setting.getInvisibleLocation( i );
              String root = setting.getInvisibleRoot( i );
View Full Code Here

       */
      public PerspectiveElementFactory( CPerspective perspective ){
        this.perspective = perspective;
        Iterator<PerspectiveElement> elements = perspective.elements();
        while( elements.hasNext() ){
          PerspectiveElement element = elements.next();
          if( element instanceof SingleCDockablePerspective ){
            SingleCDockablePerspective dockable = (SingleCDockablePerspective) element;
            dockables.put( dockable.getUniqueId(), dockable );
          }
        }
View Full Code Here

  public CPerspectiveMultipleIdentifierCollection( String factoryId, CPerspective perspective ){
    this.perspective = perspective;
   
    Iterator<PerspectiveElement> iterator = perspective.elements();
    while( iterator.hasNext() ){
      PerspectiveElement element = iterator.next();
      if( element instanceof CommonElementPerspective ){
        CElementPerspective celement = ((CommonElementPerspective)element).getElement();
        if( celement instanceof MultipleCDockablePerspective ){
          MultipleCDockablePerspective dockable = (MultipleCDockablePerspective)celement;
          if( dockable.getFactoryID().equals( factoryId ) && dockable.getUniqueId() != null ){
View Full Code Here

   * dockable.
   */
  public void storeLocations(){
    Iterator<PerspectiveElement> elements = elements();
    while( elements.hasNext() ){
      PerspectiveElement dockable = elements.next();
      if( dockable instanceof CommonElementPerspective ){
        CDockablePerspective cdockable = ((CommonElementPerspective)dockable).getElement().asDockable();
        if( cdockable != null ){
          storeLocation( cdockable );
        }
View Full Code Here

   */
  public void shrink(){
    List<ShrinkablePerspectiveStation> elements = new ArrayList<ShrinkablePerspectiveStation>();
    Iterator<PerspectiveElement> iter = elements();
    while( iter.hasNext() ){
      PerspectiveElement next = iter.next();
      if( next instanceof ShrinkablePerspectiveStation ){
        elements.add( (ShrinkablePerspectiveStation)next );
      }
    }
   
View Full Code Here

   
    public PerspectiveElement next(){
      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 );
            }
View Full Code Here

     
      LocationModeManagerPerspective manager = perspective.getLocationManager();
     
      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;
           
View Full Code Here

   * @param control the control associated with <code>cperspective</code>
   */
  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 ){
View Full Code Here

TOP

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

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.