当前位置: 首页>>代码示例>>Java>>正文


Java AbstractComponentConnector类代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:alump,项目名称:GoFullScreen,代码行数:21,代码来源:FSNativeButtonConnector.java

示例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);
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:22,代码来源:FloatingIndexConnector.java

示例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();
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:8,代码来源:NavigationButtonConnector.java

示例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);
}
 
开发者ID:vaadin,项目名称:responsive,代码行数:39,代码来源:ResponsiveConnector.java

示例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();
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:7,代码来源:CubaHistoryControlConnector.java

示例6: extractComponentElement

import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
private Element extractComponentElement(CellReference cell) {
    return ((AbstractComponentConnector) cell.getValue()).getWidget().getElement();
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:EnterKeyDownHandler.java

示例7: isCellContainingComponent

import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
private boolean isCellContainingComponent(CellReference cell) {
    return cell.getValue() instanceof AbstractComponentConnector;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:EnterKeyDownHandler.java

示例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());
                }
            }
        }

    });
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:66,代码来源:NavigationButtonConnector.java

示例9: extend

import com.vaadin.client.ui.AbstractComponentConnector; //导入依赖的package包/类
@Override
protected void extend(ServerConnector target) {
    this.target = (AbstractComponentConnector) target;
}
 
开发者ID:jouni,项目名称:restrain,代码行数:5,代码来源:RestrainConnector.java


注:本文中的com.vaadin.client.ui.AbstractComponentConnector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。