/** * Allows collaborating pages to update the published info object * * @param info */ public void updatePublishedInfo(T info) { myModel.setObject(info); }
/** * Sets the window's title * * @param title the window's title */ public void setTitle(String title) { this.titleModel.setObject(title); }
/** * inverts the navbar backgorund color * * @param invert whether to invert the color or not * @return the component's current instance */ public Navbar setInverted(final boolean invert) { this.invertModel.setObject(invert ? "navbar-inverse" : ""); return this; }
/** * marks the navigation to be rendered inside a fluid page layout. * * @return the component's current instance. */ public Navbar fluid() { this.fluid.setObject(true); return this; }
/** * sets the floating of the quote to "right". * * @return this component's instance */ public final QuoteBehavior pullRight() { pullRight.setObject("pull-right"); return this; }
/** * sets the dropdown menu alignment * * @param alignment The alignment of the button * @return this instance for chaining */ public DropDownButton setAlignment(final AlignmentBehavior.Alignment alignment) { this.alignment.setObject(alignment); return this; }
/** * sets this button to be a block element or not * * @param block true, for block mode * @return this instance for chaining */ public final ButtonBehavior setBlock(final boolean block) { this.block.setObject(block ? "btn-block" : ""); return this; }
/** * sets the size of button * * @param size size to use * @return this instance for chaining */ public final ButtonBehavior setSize(final Buttons.Size size) { this.buttonSize.setObject(size); return this; }
/** * sets a new icon type * * @return this instance for chaining */ public final IconBehavior setType(final IconType iconType) { type.setObject(iconType); return this; }
/** * sets the size of the button * * @param size mandatory parameter * @return this instance for chaining */ public DropDownButton setSize(final Buttons.Size size) { this.buttonSize.setObject(size); return this; }
/** * sets the Panel type * * @param type the Panel type * @return this instance */ public final PanelBehavior setType(final PanelType type) { this.type.setObject(type); return this; }
public void setObject(Object object) { CoordinateReferenceSystem crs = (CoordinateReferenceSystem) object; try { Integer epsgCode = CRS.lookupEpsgCode(crs, false); String srs = epsgCode != null ? "EPSG:" + epsgCode : null; srsModel.setObject(srs); } catch(Exception e) { LOGGER.log(Level.INFO, "Failed to lookup the SRS code for " + crs); srsModel.setObject(null); } }
/** * {@inheritDoc} */ @Override public void onConfigure(final Component component) { super.onConfigure(component); cssClassNameModel.setObject(createCssClassNames()); }
@Override public void onClear() { try { valueModel.setObject(UserSession.get().getJcrSession().getRootNode().getUUID()); } catch (RepositoryException e) { log.error("Unable to reset docbase to rootnode uuid", e); } redraw(); }
@Override protected void handleObject(OClass object) { String name = object!=null?object.getName():null; if(classNameModel!=null) { classNameModel.setObject(name); } else { classNameModel = Model.of(name); } }
@Override protected void onDetach() { if(classNameModel!=null) { OClass thisClass = getObject(); if(thisClass!=null && !thisClass.getName().equals(classNameModel.getObject())) { classNameModel.setObject(thisClass.getName()); } classNameModel.detach(); } }
@Override protected void onConfigure() { super.onConfigure(); if (!isReadOnlyMode()) { buttonMsg.setObject("Editar"); iconeClass.add(new AttributeModifier("class", DefaultIcons.PENCIL)); } else { buttonMsg.setObject("Visualizar"); iconeClass.add(new AttributeModifier("class", DefaultIcons.EYE)); } } };
protected void saveNode(final Node node) { try { getModel().setObject(node.getIdentifier()); } catch (final RepositoryException ex) { error(ex.getMessage()); } }
void showNew(AjaxRequestTarget target) { SIList<SInstance> list = getModelObject(); closeCallback = target1 -> revert(); currentInstance = new SInstanceListItemModel<>(getModel(), list.indexOf(list.addNew())); actionLabel.setObject(viewSupplier.get().getNewActionLabel()); MasterDetailModal.this.configureNewContent(actionLabel.getObject(), target); }