@Override public void setCaption(String caption) { getRootOrThrow().setCaption(caption); }
@Override public void setCaption(String caption) { component.setCaption(caption); }
protected void setCaption(String value) throws MException { if (componentLabel != null) componentLabel.setCaption(value); }
public Component processWidget( Component component, String elementName, Map<String, String> attributes, VaadinMetawidget metawidget ) { component.setCaption( metawidget.getLabelString( attributes ) ); return component; } }
/** * Add new section with title into small app layout. */ public void addSection(Component section, String sectionTitle) { section.setCaption(sectionTitle); addSection(section); }
@Override public void setCaption(String caption) { getComposition().setCaption(caption); }
@Override public void setCaption(String caption) { getComposition().setCaption(caption); }
@Override public void setCaption(String caption) { getComposition().setCaption(caption); }
@Override protected void setCaption(String value) throws MException { // if (getComponentLabel() != null) getComponentLabel().setCaption(""); if (getComponentEditor() != null) getComponentEditor().setCaption(value); }
@Override public void setError(String error) { Component el = getComponentError(); if (el == null) return; el.setCaption(error); el.setVisible(true); }
public boolean apply(Component component) { component.setCaption(CmsVaadinUtils.localizeString(component.getCaption())); return true; } });
@Override public void setCaption(String caption) { super.setCaption(caption); getContent().setCaption(caption); }
@Override public void clearError() { Component el = getComponentError(); if (el == null) return; el.setCaption(""); el.setVisible(false); }
protected void updateCaptions(String caption) { if (delegate.isBorderVisible()) { component.setCaption(null); ((HasCaption) delegate.getLayout()).setCaption(caption); } else { component.setCaption(caption); ((HasCaption) delegate.getLayout()).setCaption(null); } }
private void setFieldCaption(Component field) { // Set field caption and append locale indicator if needed if (StringUtils.isNotBlank(getDefinition().getLabel())) { String caption = getDefinition().getLabel(); if (locale != null && getDefinition().isI18n() && !i18NAuthoringSupport.isDefaultLocale(locale)) { caption = String.format("%s (%s)", caption, locale.toString()); } field.setCaption(caption); } }
public Dashlet getDashletInstance(DashletSpec dashletSpec) { DashletSelector dashletSelector = ((DashletSelectorAccess) getUI()).getDashletSelector(); Dashlet dashlet = dashletSelector.getDashletFactoryForName(dashletSpec.getDashletName()).newDashletInstance(dashletSpec); dashlet.getWallboardComponent(getUI()).getComponent().setCaption(null); return dashlet; }
@Override protected void handleHTML5Drop(DragAndDropEvent event) { TabSheetTargetDetails details = (TabSheetTargetDetails) event .getTargetDetails(); HorizontalDropLocation location = details.getDropLocation(); DDTabSheet tabSheet = (DDTabSheet) details.getTarget(); int idx = details.getOverIndex(); Component c = resolveComponentFromHTML5Drop(event); c.setCaption(resolveCaptionFromHTML5Drop(event)); if (location == HorizontalDropLocation.LEFT) { tabSheet.addTab(c, idx); } else if (location == HorizontalDropLocation.RIGHT) { tabSheet.addTab(c, idx + 1); } }
@Override protected void handleHTML5Drop(DragAndDropEvent event) { TabSheetTargetDetails details = (TabSheetTargetDetails) event .getTargetDetails(); HorizontalDropLocation location = details.getDropLocation(); DDTabSheet tabSheet = (DDTabSheet) details.getTarget(); int idx = details.getOverIndex(); Component c = resolveComponentFromHTML5Drop(event); c.setCaption(resolveCaptionFromHTML5Drop(event)); if (location == HorizontalDropLocation.LEFT) { tabSheet.addTab(c, idx); } else if (location == HorizontalDropLocation.RIGHT) { tabSheet.addTab(c, idx + 1); } }
private Panel wrapToPanel(Component component) { Panel panel = new Panel(component.getCaption()); panel.setSizeFull(); VerticalLayout layout = new VerticalLayout(); layout.setMargin(false); layout.setSpacing(false); layout.setSizeFull(); layout.addComponent(component); panel.setContent(layout); component.setCaption(null); return panel; }
/** * Adds a component to a given vertical layout and applies some sizing and formatting options. * * @param verticalLayout the vertical layout * @param component the component to be added */ private void addToComponent(VerticalLayout verticalLayout, Component component) { HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setWidth(100, Unit.PERCENTAGE); Label label = new Label(component.getCaption()); label.setWidth(200, Unit.PIXELS); component.setSizeFull(); component.setCaption(null); horizontalLayout.addComponent(label); horizontalLayout.addComponent(component); horizontalLayout.setExpandRatio(component, 1.0f); verticalLayout.addComponent(horizontalLayout); }