public String iconClass() { if (iconClass == null && iconProcessor != null) { return iconProcessor.apply(this, model); } return iconClass; }
@Override public StudioContent makeContent(String id) { return contentFactory.apply(id, this); }
private <X> LinkedHashSet<X> recursiveIteration(SType<?> toIterate, LinkedHashSet<SType<?>> excludedTypes, IBiFunction<SType<?>, LinkedHashSet<SType<?>>, Stream<X>> function) { LinkedHashSet<X> blocks = new LinkedHashSet<>(); if (isDocumentationRelated(toIterate)) { function.apply(toIterate, excludedTypes).forEach(blocks::add); for (SType<?> contained : STypes.containedTypes(toIterate)) { if (excludedTypes.contains(contained)) { continue; } function.apply(contained, excludedTypes).forEach(blocks::add); blocks.addAll(recursiveIteration(contained, excludedTypes, function)); } } return blocks; }
private <X> LinkedHashSet<X> recursiveIteration(SType<?> toIterate, LinkedHashSet<SType<?>> excludedTypes, IBiFunction<SType<?>, LinkedHashSet<SType<?>>, Stream<X>> function) { LinkedHashSet<X> blocks = new LinkedHashSet<>(); if (isDocumentationRelated(toIterate)) { function.apply(toIterate, excludedTypes).forEach(blocks::add); for (SType<?> contained : STypes.containedTypes(toIterate)) { if (excludedTypes.contains(contained)) { continue; } function.apply(contained, excludedTypes).forEach(blocks::add); blocks.addAll(recursiveIteration(contained, excludedTypes, function)); } } return blocks; }
private <X> LinkedHashSet<X> recursiveIteration(SType<?> toIterate, LinkedHashSet<SType<?>> excludedTypes, IBiFunction<SType<?>, LinkedHashSet<SType<?>>, Stream<X>> function) { LinkedHashSet<X> blocks = new LinkedHashSet<>(); if (isDocumentationRelated(toIterate)) { function.apply(toIterate, excludedTypes).forEach(blocks::add); for (SType<?> contained : STypes.containedTypes(toIterate)) { if (excludedTypes.contains(contained)) { continue; } function.apply(contained, excludedTypes).forEach(blocks::add); blocks.addAll(recursiveIteration(contained, excludedTypes, function)); } } return blocks; }
public void appendComponent(IBiFunction<String, IModel<T>, Component> factory, IModel<T> rowModel) { otherActions.add(factory.apply(actions.newChildId(), rowModel)); }
public <R extends BSTSection> R newTSection(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSTRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public void appendComponent(IBiFunction<String, IModel<T>, Component> factory, IModel<T> rowModel) { otherActions.add(factory.apply(actions.newChildId(), rowModel)); }
public <R extends BSRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSTRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSTSection> R newTSection(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSTRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSTRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public <R extends BSRow> R newRow(IBiFunction<String, IBSGridCol.BSGridSize, R> factory) { return newComponent(id -> factory.apply(id, getDefaultGridSize())); }
public BSActionPanel<T> appendAction(ActionConfig<T> actionConfig) { MarkupContainer link = actionConfig.linkFactory.apply(LINK_ID, getModel()); actions.add(new WebMarkupContainer(actions.newChildId()) .add(link.add($b.attrAppender("class", actionConfig.styleClasses, " ")))); if (actionConfig.stripeModel != null) { link.add($b.attrAppender("class", actionConfig.stripeModel, " ")); } if (link.get(ICONE_ID) == null) { link.add(new IconeView(ICONE_ID, actionConfig.iconeModel, actionConfig.iconeStyle, actionConfig.iconeClass)); } if (actionConfig.labelModel != null) { if (actionConfig.withText) { link.add(new Label(LABEL_ID, actionConfig.labelModel)); } else { link.add($b.attr("title", actionConfig.labelModel)); link.add(new WebMarkupContainer(LABEL_ID)); } } link.add($b.attr("data-toggle", "tooltip")); link.add($b.attr("data-placement", "bottom")); if (actionConfig.titleFunction != null) { link.add($b.attr("title", actionConfig.titleFunction.apply(getModel()))); } else { link.add($b.attr("title", actionConfig.labelModel)); } return this; }
public BSActionPanel<T> appendAction(ActionConfig<T> actionConfig) { MarkupContainer link = actionConfig.linkFactory.apply(LINK_ID, getModel());