Package bibliothek.gui.dock.facile.mode

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


            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


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

              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

    private Location getInvisibleLocation( CDockablePerspective dockable ){
    LocationHistory history = dockable.getLocationHistory();
    List<Path> order = history.getOrder();
    if( !order.isEmpty() ){
      Path mode = order.get( order.size()-1 );
      Location location = history.getLocations().get( mode );
      return location;
    }
    return null;
    }
View Full Code Here

    forward( location );
  }
 
  private void forward( CMaximizedModeAreaPerspective area ){
    Path mode = lastMaximizedMode.remove( area.getUniqueId() );
    Location location = lastMaximizedLocation.remove( area.getUniqueId() );
   
    area.setUnmaximize( mode, location );
  }
View Full Code Here

      for( int i = 0, n = getAreaCount(); i<n; i++ ){
        CMaximizedModeAreaPerspective area = getArea( i );
        Path mode = area.getUnmaximizeMode();
        if( mode != null ){
          modeSetting.getLastMaximizedMode().put( area.getUniqueId(), mode );
          Location location = area.getUnmaximizeLocation();
          if( location != null ){
            modeSetting.getLastMaximizedLocation().put( area.getUniqueId(), location );
          }
        }
      }
View Full Code Here

   * @param dockable the element whose location should be stored
   * @return the location that was stored or <code>null</code> if the location of
   * <code>dockable</code> could not be determined
   */
  public Location storeLocation( CDockablePerspective dockable ){
      Location location = getLocationManager().getLocation( dockable );
      if( location != null ){
        dockable.getLocationHistory().add( getLocationManager().getMode( location.getMode() ), location );

        String id = getId( dockable );
       
        if( id != null ){
          dockables.put( id, dockable );
View Full Code Here

    }
    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

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

   
    public Runnable onApply( LocationModeEvent event ){
      if( event.isDone() )
        return null;
     
      Location location = event.getLocation();
          Dockable dockable = event.getDockable();
         
      DockableProperty property = location == null ? null : location.getLocation();
     
      if( event.getMode().getUniqueIdentifier().equals( normalModeIdentifier() )){
        // try to set the mode prematurely
            if( property != null ){
              if( property.getSuccessor() == null ){
                  CLocationMode last = manager.getCurrentMode( dockable );
                  CLocationMode secondLast = manager.getPreviousMode( dockable );
                 
                    if( last != null && secondLast != null ){
                      if( normalModeIdentifier().equals( secondLast.getUniqueIdentifier() ) &&
                          MaximizedMode.IDENTIFIER.equals( last.getUniqueIdentifier() )){
                       
                        MaximizedModeArea area = maximizedMode.get( location.getRoot() );
                       
                            if( area == this ){
                                area.setMaximized( dockable, false, null, event.getAffected() );
                                event.done(true);
                                return null;
                            }
                        }
                    }
                }
            }
        }
     
          // if the element is about to become a child of this station, ensure
          // this station does not show a maximized element
          if( location != null && getMaximized() != null ){
            Map<ExtendedMode, DockStation> roots = manager.getRepresentations( location.getRoot() );
            for( DockStation station : roots.values() ){
              if( DockUtilities.isAncestor( getStation(), station )){
                maximizedMode.unmaximize( this, event.getAffected() )
                break;
              }
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.