Package bibliothek.gui.dock.common.mode

Examples of bibliothek.gui.dock.common.mode.ExtendedMode


     
        if( location == null ){
            defaultLocations.remove( mode );
        }
        else{
          ExtendedMode locationMode = location.findMode();
          if( locationMode == null ){
            throw new IllegalArgumentException( "location does not carry enough information to find its mode" );
          }
          if( !mode.getModeIdentifier().equals( locationMode.getModeIdentifier() )){
            throw new IllegalArgumentException( "mode of location and \'mode\' do not have the same identifier" );
          }
         
            defaultLocations.put( mode, location );
       
View Full Code Here


    // 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();
    }
View Full Code Here

            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

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

            CDockablePerspective dockable = ((CommonElementPerspective)element).getElement().asDockable();
            if( dockable != null ){
              DockableProperty location = setting.getInvisibleLocation( i );
              String root = setting.getInvisibleRoot( i );
             
              ExtendedMode mode = cperspective.getLocationManager().getMode( root, location );
              if( mode != null ){
                dockable.getLocationHistory().add( mode, new Location( mode.getModeIdentifier(), root, location ) );
              }
             
              cperspective.putDockable( dockable );
            }
          }
View Full Code Here

  public Location getLocation( PerspectiveDockable dockable ){
    CStationPerspective root = getRoot( dockable );
    if( root == null ){
      return null;
    }
    ExtendedMode mode = getMode( dockable );
    if( mode == null ){
      return null;
    }
    DockableProperty location = DockUtilities.getPropertyChain( root.intern().asStation(), dockable );
    if( location == null ){
      return null;
    }
    return new Location( mode.getModeIdentifier(), root.getUniqueId(), location );
  }
View Full Code Here

                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

               
                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 + "'" );
                  }
                  Location location = locations.get( item );
                  if( location != null ){
                    history.add( mode, location );
                  }
                }
              }
            }
          }
        }
      }
     
      // mode settings
      for( ExtendedMode mode : getModes() ){
        ModeSetting<Location> modeSetting = modes.getSettings( mode.getModeIdentifier() );
        if( modeSetting != null ){
          getMode( mode ).readSetting( modeSetting );
        }
      }
  }
View Full Code Here

                frontend.hide( dockable.intern() );

                if( changes ){
                  for( Dockable focused : focusHistory ){
                    ExtendedMode mode = nonBasic.get( focused );
                    if( mode != null ){
                      if( frontend.isShown( focused ) && locationManager.isModeAvailable( focused, mode )){
                        locationManager.setMode( focused, mode );
                      }
                    }
View Full Code Here

        if( action == null || action.forceAccept( parent, child )){
          return true;
        }
      }
     
      ExtendedMode extendedMode = manager.childsExtendedMode( parent );
      if( extendedMode == null ){
        extendedMode = manager.getMode( child )
        if( extendedMode == null ){
          return true;
        }
      }
     
      CLocationMode mode = manager.getMode( extendedMode.getModeIdentifier() );
      if( mode == null )
        return true;
     
      if( !mode.respectWorkingAreas( parent ) ){
        return true;
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.common.mode.ExtendedMode

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.