本文整理汇总了Java中com.vaadin.client.ui.AbstractComponentConnector类的典型用法代码示例。如果您正苦于以下问题:Java AbstractComponentConnector类的具体用法?Java AbstractComponentConnector怎么用?Java AbstractComponentConnector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractComponentConnector类属于com.vaadin.client.ui包,在下文中一共展示了AbstractComponentConnector类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStateChanged
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
if (fullscreenTarget != getState().fullscreenTarget) {
if (getState().fullscreenTarget == null) {
fullscreenTarget = null;
} else {
fullscreenTarget = ((AbstractComponentConnector) (getState().fullscreenTarget))
.getWidget().getElement();
}
notifyStateChange();
}
if (!FSButtonUtil.isFullscreenSupported(Document.get().getBody())) {
if (getState().hideIfNotSupported) {
getWidget().setVisible(false);
}
}
}
示例2: onStateChanged
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
if (widget != null) {
widget.removeFromParent();
}
widget = new FloatingIndexWidget();
VNavigationView navView = ((NavigationViewConnector) getParent())
.getWidget();
for (int i = 0; i < getState().keys.size(); i++) {
String string = getState().keys.get(i);
AbstractComponentConnector c = (AbstractComponentConnector) getState().connectors
.get(i);
widget.map(string, c.getWidget(), navView.getContent().getElement()
.getParentElement());
}
navView.add(widget);
}
示例3: getTargetWidget
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
private Widget getTargetWidget() {
Connector targetView = getState().getTargetView();
if (targetView == null) {
return null;
}
return ((AbstractComponentConnector) targetView).getWidget();
}
示例4: extend
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
protected void extend(ServerConnector target) {
// Initialize cache if not already done
if (widthRangeCache == null) {
searchForBreakPoints();
}
this.target = (AbstractComponentConnector) target;
// Construct the list of selectors we should match against in the
// range selectors
String primaryStyle = this.target.getState().primaryStyleName;
StringBuilder selectors = new StringBuilder();
selectors.append("." + primaryStyle);
if (this.target.getState().styles != null
&& this.target.getState().styles.size() > 0) {
for (String style : this.target.getState().styles) {
// TODO decide all the combinations we want to support
selectors.append(",." + style);
selectors.append(",." + primaryStyle + "." + style);
selectors.append(",." + style + "." + primaryStyle);
selectors.append(",." + primaryStyle + "-" + style);
}
}
// Allow the ID to be used as the selector as well for ranges
if (this.target.getState().id != null) {
selectors.append(",#" + this.target.getState().id);
}
// Get any breakpoints from the styles defined for this widget
getBreakPointsFor(selectors.toString());
// Start listening for size changes
LayoutManager.get(getConnection()).addElementResizeListener(
this.target.getWidget().getElement(), this);
}
示例5: isAttached
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
protected boolean isAttached() {
AbstractComponentConnector connectorTarget = (AbstractComponentConnector) target;
return connectorTarget != null
&& connectorTarget.getWidget() != null
&& connectorTarget.getWidget().isAttached();
}
示例6: extractComponentElement
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
private Element extractComponentElement(CellReference cell) {
return ((AbstractComponentConnector) cell.getValue()).getWidget().getElement();
}
示例7: isCellContainingComponent
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
private boolean isCellContainingComponent(CellReference cell) {
return cell.getValue() instanceof AbstractComponentConnector;
}
示例8: init
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
protected void init() {
super.init();
getWidget().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (!getWidget().isEnabled()) {
return;
}
VNavigationManager panel = getWidget().findNavigationPanel();
if (panel != null) {
if (getTargetWidget() != null) {
if (getTargetWidget().getParent() == panel) {
panel.setCurrentWidget(getTargetWidget());
} else {
NavigationManagerConnector navigationManager;
ServerConnector parent2 = getParent();
while (parent2 != null
&& !(parent2 instanceof NavigationManagerConnector)) {
parent2 = parent2.getParent();
}
navigationManager = (NavigationManagerConnector) parent2;
AbstractComponentConnector previousComponent = (AbstractComponentConnector) navigationManager
.getState().getPreviousComponent();
AbstractComponentConnector nextComponent = (AbstractComponentConnector) navigationManager
.getState().getNextComponent();
if (previousComponent != null
&& getState().getTargetView()
.getConnectorId() == previousComponent
.getConnectorId()) {
// See #11436 && #11437
// VConsole.error("Ehh, equal with previous based on identifiers, but widget is different"
// + (getTargetWidget() !=
// previousComponent.getWidget()));
// get target widget widget via hierarchy
panel.setCurrentWidget(previousComponent
.getWidget());
} else if (nextComponent != null
&& getState().getTargetView()
.getConnectorId() == nextComponent
.getConnectorId()) {
// See #11436 && #11437
// VConsole.error("Ehh!, equal with next based on identifiers, but widget is different"
// + (getTargetWidget() !=
// nextComponent.getWidget()));
panel.setCurrentWidget(nextComponent
.getWidget());
} else {
panel.setNextWidget(getTargetWidget());
panel.navigateForward();
}
}
} else {
VConsole.error("Placeholder navigation..");
panel.navigateToPlaceholder(getPlaceHolderCaption());
}
}
}
});
}
示例9: extend
import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
protected void extend(ServerConnector target) {
this.target = (AbstractComponentConnector) target;
}