/** * Constructs a rating component with 5 stars, using the rating for retrieving the rating. * * @param id * the component id * @param rating * the model to get the rating */ public RatingPanel(final String id, final IModel<? extends Number> rating) { this(id, rating, new Model<Integer>(5), null, new Model<>(Boolean.FALSE), true); }
/** * @see Label#Label(String, java.io.Serializable) */ public SmartLinkLabel(final String name, final String label) { this(name, new Model<>(label)); }
/** * @see MultiLineLabel#MultiLineLabel(String, String) */ public SmartLinkMultiLineLabel(final String id, final String label) { this(id, new Model<>(label)); }
/** * Override of the default initModel behaviour. This component <strong>will not</strong> use any * compound model of a parent. * * @see org.apache.wicket.Component#initModel() */ @Override protected IModel<?> initModel() { return new Model<>(-1); }
/** * @param id * See Component * @param string * Name of image * @see org.apache.wicket.Component#Component(String, IModel) */ public Image(final String id, final String string) { this(id, new Model<>(string)); }
/** * @param id * See Component * @param string * Name of image * @see org.apache.wicket.Component#Component(String, IModel) */ public ImageButton(final String id, final String string) { this(id, new Model<String>(string)); }
/** * Factory methods for Model which uses type inference to make code shorter. Equivalent to * <code>new Model<TypeOfObject>(object)</code>. * * @param <T> * @param object * @return Model that contains <code>object</code> */ public static <T extends Serializable> Model<T> of(T object) { return new Model<>(object); }
/** * Constructor * * @param contextRelativePath * context-relative path, eg <code>images/border.jpg</code> */ public ContextPathGenerator(String contextRelativePath) { this.contextRelativePath = new Model<String>(contextRelativePath); }
/** * @param description * * {@inheritDoc} */ @Override public IModel<PageWindowDescription> model(PageWindowDescription description) { return new Model<>(description); }
/** * @param id * See Component * @param string * Name of image * @see org.apache.wicket.Component#Component(String, IModel) */ public ImageButton(final String id, final String string) { this(id, new Model<String>(string)); }
/** * Factory methods for Model which uses type inference to make code shorter. Equivalent to * <code>new Model<TypeOfObject>()</code>. * * @param <T> * @return Model that contains <code>object</code> */ public static <T extends Serializable> Model<T> of() { return new Model<>(); }
/** * @param id * See Component * @param string * Name of image * @see org.apache.wicket.Component#Component(String, IModel) */ public Image(final String id, final String string) { this(id, new Model<>(string)); }
/** * Construct. * * @param id * component id * @param modelObject * the model object (will be wrapped in a model) */ public Include(String id, String modelObject) { super(id, new Model<>(modelObject)); }
/** * Constructor * * @param contextRelativePath * context-relative path, eg <code>images/border.jpg</code> */ public ContextPathGenerator(String contextRelativePath) { this.contextRelativePath = new Model<String>(contextRelativePath); }
@Override public IModel<T> model(T object) { return new Model<>(object); } }
/** * Constructor. File name used will be the result of <code>file.getName()</code> * * @param id * component id * @param file * file to stream to client */ public DownloadLink(String id, File file) { this(id, new Model<File>(Args.notNull(file, "file"))); }
/** * Constructor. File name used will be the result of <code>file.getName()</code> * * @param id * component id * @param file * file to stream to client */ public DownloadLink(String id, File file) { this(id, new Model<File>(Args.notNull(file, "file"))); }
/** * Construct. * * @param id * @param pageable */ public NavigatorLabel(final String id, final IPageableItems pageable) { super(id); setDefaultModel(new StringResourceModel("NavigatorLabel", this, new Model<>(new LabelModelObject(pageable)))); }
@Override protected void onConfigure() { super.onConfigure(); setDefaultModel(new Model<Integer>( (int)Math.max(Integer.MAX_VALUE, pageable.getPageCount()))); // PagingNavigation itself (as well as the PageableListView) // may have pages. // The index of the first page link depends on the PageableListView's // page currently printed. setStartIndex(); }
@Override protected void onConfigure() { super.onConfigure(); setDefaultModel(new Model<Integer>( (int)Math.max(Integer.MAX_VALUE, pageable.getPageCount()))); // PagingNavigation itself (as well as the PageableListView) // may have pages. // The index of the first page link depends on the PageableListView's // page currently printed. setStartIndex(); }