public Dockable getFirst( Filter<Dockable> filter ){ for( Dockable dockable : history ){ if( filter.includes( dockable )){ return dockable; } } return null; }
public Dockable getFirst( Filter<Dockable> filter ){ for( Dockable dockable : history ){ if( filter.includes( dockable )){ return dockable; } } return null; }
/** * Searches the factory which handles <code>id</code>. * @param id the name of a factory * @return the factory or <code>null</code> */ public SingleCDockableFactory getFactory( String id ){ Entry entry = singleIdFactories.get( id ); if( entry != null ){ return entry.factory; } for( Entry factory : factories ){ if( factory.filter.includes( id )){ return factory.factory; } } return null; }
/** * Searches the factory which handles <code>id</code>. * @param id the name of a factory * @return the factory or <code>null</code> */ public SingleCDockableFactory getFactory( String id ){ Entry entry = singleIdFactories.get( id ); if( entry != null ){ return entry.factory; } for( Entry factory : factories ){ if( factory.filter.includes( id )){ return factory.factory; } } return null; }
public CDockable getFirst( Filter<CDockable> filter ){ CDockable[] history = getHistory(); Set<CDockable> visited = new HashSet<CDockable>(); for( CDockable dockable : history ){ if( filter.includes( dockable )){ return dockable; } visited.add( dockable ); } for( CDockable dockable : control.getRegister().getDockables() ){ if( !visited.contains( dockable )){ if( filter.includes( dockable )){ return dockable; } } } return null; } }
public CDockable getFirst( Filter<CDockable> filter ){ CDockable[] history = getHistory(); Set<CDockable> visited = new HashSet<CDockable>(); for( CDockable dockable : history ){ if( filter.includes( dockable )){ return dockable; } visited.add( dockable ); } for( CDockable dockable : control.getRegister().getDockables() ){ if( !visited.contains( dockable )){ if( filter.includes( dockable )){ return dockable; } } } return null; } }
private DockComponentConfiguration getConfigurationFor( DockComponentRoot root ){ for( Tuple<Filter<DockComponentRoot>, DockComponentConfiguration> config : configurations ){ if( config.getA().includes( root )){ return config.getB(); } } return defaultConfiguration; }
private DockComponentConfiguration getConfigurationFor( DockComponentRoot root ){ for( Tuple<Filter<DockComponentRoot>, DockComponentConfiguration> config : configurations ){ if( config.getA().includes( root )){ return config.getB(); } } return defaultConfiguration; }
if( register.isSingleId( entry.getKey() )){ String id = register.singleToNormalId( entry.getKey() ); if( ids.includes( id )){ SingleCDockable dockable = factory.createBackup( id ); if( dockable != null ){
if( register.isSingleId( entry.getKey() )){ String id = register.singleToNormalId( entry.getKey() ); if( ids.includes( id )){ SingleCDockable dockable = factory.createBackup( id ); if( dockable != null ){