/** * Removes all factories that were added by a theme */ public void clearThemeFactories(){ for( DockTitleVersion version : titleVersions.values() ) version.setFactory( null, Priority.THEME ); } }
/** * Removes all factories that were added by a theme */ public void clearThemeFactories(){ for( DockTitleVersion version : titleVersions.values() ) version.setFactory( null, Priority.THEME ); } }
/** * Registers a factory for the given key * @param id the key of the factory * @param factory the factory * @param priority the priority of this registration * @return the handle to the factory or a factory with higher priority */ public DockTitleVersion register( String id, DockTitleFactory factory, Priority priority ){ DockTitleVersion version = titleVersions.get( id ); if( version == null ){ version = new DockTitleVersion( controller, id ); titleVersions.put( id, version ); } version.setFactory( factory, priority ); return version; }
/** * Registers a factory for the given key * @param id the key of the factory * @param factory the factory * @param priority the priority of this registration * @return the handle to the factory or a factory with higher priority */ public DockTitleVersion register( String id, DockTitleFactory factory, Priority priority ){ DockTitleVersion version = titleVersions.get( id ); if( version == null ){ version = new DockTitleVersion( controller, id ); titleVersions.put( id, version ); } version.setFactory( factory, priority ); return version; }
/** * Gets the handle with the key <code>id</code>. If the key is unknown, then * a new handle is created, using <code>factory</code> as default factory. * @param id the key of the handle * @param factory the default factory used when a new handle has to be created, can be <code>null</code> * @return the handle */ public DockTitleVersion getVersion( String id, DockTitleFactory factory ){ DockTitleVersion version = titleVersions.get( id ); if( version == null ){ version = new DockTitleVersion( controller, id ); titleVersions.put( id, version ); } if( version.getFactory( Priority.DEFAULT ) == null ){ version.setFactory( factory, Priority.DEFAULT ); } return version; }
/** * Gets the handle with the key <code>id</code>. If the key is unknown, then * a new handle is created, using <code>factory</code> as default factory. * @param id the key of the handle * @param factory the default factory used when a new handle has to be created, can be <code>null</code> * @return the handle */ public DockTitleVersion getVersion( String id, DockTitleFactory factory ){ DockTitleVersion version = titleVersions.get( id ); if( version == null ){ version = new DockTitleVersion( controller, id ); titleVersions.put( id, version ); } if( version.getFactory( Priority.DEFAULT ) == null ){ version.setFactory( factory, Priority.DEFAULT ); } return version; }