List of usage examples for com.vaadin.client VCaption updateCaption
public boolean updateCaption()
From source file:com.haulmont.cuba.web.toolkit.ui.client.gridlayout.CubaGridLayoutConnector.java
License:Apache License
@Override public void updateCaption(ComponentConnector childConnector) { // CAUTION copied from GridLayoutConnector.updateCaption(ComponentConnector childConnector) VGridLayout layout = getWidget();/*w w w . ja v a2 s. c o m*/ VGridLayout.Cell cell = layout.widgetToCell.get(childConnector.getWidget()); AbstractComponentState state = childConnector.getState(); if (VCaption.isNeeded(state) || isContextHelpIconEnabled(state)) { VLayoutSlot layoutSlot = cell.slot; VCaption caption = layoutSlot.getCaption(); if (caption == null) { // use our own caption widget caption = new CubaCaptionWidget(childConnector, getConnection()); setDefaultCaptionParameters((CubaCaptionWidget) caption); Widget widget = childConnector.getWidget(); layout.setCaption(widget, caption); } caption.updateCaption(); } else { layout.setCaption(childConnector.getWidget(), null); getLayoutManager().setNeedsLayout(this); } }
From source file:com.haulmont.cuba.web.widgets.client.gridlayout.CubaGridLayoutConnector.java
License:Apache License
@Override public void updateCaption(ComponentConnector childConnector) { // CAUTION copied from GridLayoutConnector.updateCaption(ComponentConnector childConnector) VGridLayout layout = getWidget();//from ww w .j a v a 2 s . co m VGridLayout.Cell cell = layout.widgetToCell.get(childConnector.getWidget()); AbstractComponentState state = childConnector.getState(); if (VCaption.isNeeded(childConnector) || isContextHelpIconEnabled(state)) { VLayoutSlot layoutSlot = cell.slot; VCaption caption = layoutSlot.getCaption(); if (caption == null) { // use our own caption widget caption = new CubaCaptionWidget(childConnector, getConnection()); setDefaultCaptionParameters((CubaCaptionWidget) caption); Widget widget = childConnector.getWidget(); layout.setCaption(widget, caption); } caption.updateCaption(); } else { layout.setCaption(childConnector.getWidget(), null); getLayoutManager().setNeedsLayout(this); } }