/** * Creates and sets up a new view. * @param <A> the type of the view * @param <D> the type of action to convert * @param type the type of action * @param action the action for which a view is created * @param target the target platform, where the view will be shown * @param dockable the Dockable for which the action is used * @return the new view or <code>null</code> if nothing should be shown * @throws IllegalArgumentException if an unknown argument is used */ public <A, D extends DockAction> A createView( ActionType<D> type, D action, ViewTarget<A> target, Dockable dockable ){ ViewGenerator<D,A> converter = getConverter( type, target ); if( converter == null ) throw new IllegalArgumentException( "That combination is not known: " + type + " " + target ); return converter.create( this, action, dockable ); }
/** * Creates and sets up a new view. * @param <A> the type of the view * @param <D> the type of action to convert * @param type the type of action * @param action the action for which a view is created * @param target the target platform, where the view will be shown * @param dockable the Dockable for which the action is used * @return the new view or <code>null</code> if nothing should be shown * @throws IllegalArgumentException if an unknown argument is used */ public <A, D extends DockAction> A createView( ActionType<D> type, D action, ViewTarget<A> target, Dockable dockable ){ ViewGenerator<D,A> converter = getConverter( type, target ); if( converter == null ) throw new IllegalArgumentException( "That combination is not known: " + type + " " + target ); return converter.create( this, action, dockable ); }