本文整理汇总了Java中com.vaadin.shared.Connector类的典型用法代码示例。如果您正苦于以下问题:Java Connector类的具体用法?Java Connector怎么用?Java Connector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Connector类属于com.vaadin.shared包,在下文中一共展示了Connector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: error
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Override
public void error(final ErrorEvent event) {
final HawkbitErrorNotificationMessage message = buildNotification(getRootExceptionFrom(event));
if (event instanceof ConnectorErrorEvent) {
final Connector connector = ((ConnectorErrorEvent) event).getConnector();
if (connector instanceof UI) {
final UI uiInstance = (UI) connector;
uiInstance.access(() -> message.show(uiInstance.getPage()));
return;
}
}
final Optional<Page> originError = getPageOriginError(event);
if (originError.isPresent()) {
message.show(originError.get());
return;
}
HawkbitErrorNotificationMessage.show(message.getCaption(), message.getDescription(), Type.HUMANIZED_MESSAGE);
}
开发者ID:eclipse,项目名称:hawkbit,代码行数:22,代码来源:HawkbitUIErrorHandler.java
示例2: getComponent
import com.vaadin.shared.Connector; //导入依赖的package包/类
/**
* Get component with given slot coordinate
* @param x Slot's X coordinate
* @param y Slot's Y coordinate
* @param acceptInsideHit If true also other slots reserved by component are accepted
* @return Component at slot, or null if component not found
*/
public Component getComponent(int x, int y, boolean acceptInsideHit) {
for(Connector connector : getState().childOptions.keySet()) {
GridStackChildOptions info = getState().childOptions.get(connector);
if(acceptInsideHit) {
if(x >= info.x && x < (info.x + info.width) && y >= info.y && y < (info.y + info.width)) {
return (Component) connector;
}
} else {
if (info.x == x && info.y == y) {
return (Component) connector;
}
}
}
return null;
}
开发者ID:alump,项目名称:GridStack,代码行数:23,代码来源:GridStackLayout.java
示例3: registerTimer
import com.vaadin.shared.Connector; //导入依赖的package包/类
public void registerTimer(Connector connector) {
if (connector != null) {
if (connector instanceof TimerConnector) {
VTimer newTimer = ((TimerConnector) connector).getWidget();
if (timer != newTimer) {
// unregister event handlers from current timer
removeTimerHandlers();
// set new timer and register event handlers
timer = newTimer;
addTimerHandlers();
}
}
} else {
// unregister event handlers from current timer
removeTimerHandlers();
timer = null;
}
}
开发者ID:tilioteo,项目名称:hypothesis,代码行数:21,代码来源:VTimerLabel.java
示例4: onStateChanged
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Override
public void onStateChanged(StateChangeEvent event) {
super.onStateChanged(event);
//Duration duration = new Duration();
clickEventHandler.handleEventHandlerRegistration();
if(event.isInitialStateChange() || event.hasPropertyChanged("gridStackOptions")) {
getWidget().setOptions(getState().gridStackOptions.width, getState().gridStackOptions.height,
getState().gridStackOptions);
}
//LOGGER.info("onStateChange so far " + duration.elapsedMillis() + "ms");
if(getWidget().isInitialized() && event.hasPropertyChanged("childOptions")) {
getWidget().batchUpdate();
for(Connector connector : getChildConnectorsInCoordinateOrder()) {
Widget widget = ((ComponentConnector)connector).getWidget();
getWidget().updateChild(widget, getState().childOptions.get(connector));
}
getWidget().commit();
}
if(event.isInitialStateChange()) {
initialRedraw();
}
//LOGGER.info("onStateChange took " + duration.elapsedMillis() + "ms");
}
开发者ID:alump,项目名称:GridStack,代码行数:30,代码来源:GridStackLayoutConnector.java
示例5: getChildConnectorsInCoordinateOrder
import com.vaadin.shared.Connector; //导入依赖的package包/类
/**
* Short child connectors to order based on their coordinates. This helps to get wanted order defined by server
* side.
* @return Children in order of coordinates
*/
private List<Connector> getChildConnectorsInCoordinateOrder() {
List<Connector> list = new ArrayList<Connector>();
for(Connector connector : getState().childOptions.keySet()) {
list.add(connector);
}
Collections.sort(list, childConnectorComparator);
return list;
}
开发者ID:alump,项目名称:GridStack,代码行数:16,代码来源:GridStackLayoutConnector.java
示例6: GridStackMoveData
import com.vaadin.shared.Connector; //导入依赖的package包/类
public GridStackMoveData(Connector child, int x, int y, int width, int height) {
this.child = child;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
开发者ID:alump,项目名称:GridStack,代码行数:8,代码来源:GridStackMoveData.java
示例7: findComponent
import com.vaadin.shared.Connector; //导入依赖的package包/类
/**
* Finds the nearest component by traversing upwards in the hierarchy. If
* connector is a Component, that Component is returned. Otherwise, looks
* upwards in the hierarchy until it finds a {@link Component}.
*
* @return A Component or null if no component was found
*/
public static Component findComponent(Connector connector) {
if (connector instanceof Component) {
return (Component) connector;
}
if (connector.getParent() != null) {
return findComponent(connector.getParent());
}
return null;
}
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecurity,代码行数:18,代码来源:SpringSecurityErrorHandler.java
示例8: getSteps
import com.vaadin.shared.Connector; //导入依赖的package包/类
/**
* Returns a unmodifiable List of steps.
*
* @return List of steps
*/
public List<Step> getSteps() {
List<Step> steps = new ArrayList<Step>();
for (Connector sc : getState(false).steps) {
steps.add(((StepComponent) sc).getState(false).step);
}
return Collections.unmodifiableList(steps);
}
开发者ID:tltv,项目名称:gantt,代码行数:13,代码来源:Gantt.java
示例9: iterator
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Override
public Iterator<Component> iterator() {
List<Component> l = new ArrayList<Component>();
for (Connector c : getState(false).steps) {
l.add((Component) c);
}
return l.iterator();
}
开发者ID:tltv,项目名称:gantt,代码行数:9,代码来源:Gantt.java
示例10: getSteps
import com.vaadin.shared.Connector; //导入依赖的package包/类
protected List<StepWidget> getSteps() {
List<StepWidget> steps = new ArrayList<StepWidget>();
for (Connector sc : getState().steps) {
steps.add(((StepConnector) sc).getWidget());
}
return steps;
}
开发者ID:tltv,项目名称:gantt,代码行数:8,代码来源:GanttConnector.java
示例11: getStepsMap
import com.vaadin.shared.Connector; //导入依赖的package包/类
protected Map<Step, StepWidget> getStepsMap() {
Map<Step, StepWidget> steps = new HashMap<Step, StepWidget>();
StepWidget stepWidget;
for (Connector sc : getState().steps) {
stepWidget = ((StepConnector) sc).getWidget();
steps.put(((StepConnector) sc).getState().step, stepWidget);
}
return steps;
}
开发者ID:tltv,项目名称:gantt,代码行数:10,代码来源:GanttConnector.java
示例12: handleVerticalScrollDelegateTargetChange
import com.vaadin.shared.Connector; //导入依赖的package包/类
void handleVerticalScrollDelegateTargetChange() {
Connector c = getState().verticalScrollDelegateTarget;
unRegisterScrollDelegateHandlers();
delegateScrollConnector = null;
delegateScrollPanelTarget = null;
if (c instanceof GridConnector) {
delegateScrollConnector = (GridConnector) c;
delegateScrollGridTarget = ((GridConnector) c).getWidget();
registerScrollDelegateHandlers();
}
}
开发者ID:tltv,项目名称:gantt,代码行数:13,代码来源:GanttConnector.java
示例13: iterator
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Override
public Iterator<Component> iterator() {
List<Component> l = new ArrayList<Component>();
for (Connector c : getState(false).subSteps) {
l.add((Component) c);
}
return l.iterator();
}
开发者ID:tltv,项目名称:gantt,代码行数:9,代码来源:StepComponent.java
示例14: connector2Widget
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Contract("null -> null")
public static Widget connector2Widget(@Nullable Connector connector) {
if (connector == null) {
return null;
}
ComponentConnector componentConnector = (ComponentConnector)connector;
return componentConnector.getWidget();
}
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:GwtUIUtil.java
示例15: reset
import com.vaadin.shared.Connector; //导入依赖的package包/类
private void reset(@Nullable Connector connector) {
if (connector != null) {
com.vaadin.ui.Component component = (com.vaadin.ui.Component)connector;
component.setParent(null);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:WGwtThreeComponentSplitLayout.java
示例16: click
import com.vaadin.shared.Connector; //导入依赖的package包/类
/**
* Simulates a button click, notifying all server-side listeners.
*
* No action is taken if the button is disabled.
*/
public void click() {
if (isEnabled() && !isReadOnly()) {
Connector targetView = getState().getTargetView();
if (targetView != null) {
getNavigationManager().navigateTo((Component) targetView);
}
fireClick();
}
}
开发者ID:vaadin,项目名称:touchkit,代码行数:17,代码来源:NavigationButton.java
示例17: getTargetWidget
import com.vaadin.shared.Connector; //导入依赖的package包/类
private Widget getTargetWidget() {
Connector targetView = getState().getTargetView();
if (targetView == null) {
return null;
}
return ((AbstractComponentConnector) targetView).getWidget();
}
开发者ID:vaadin,项目名称:touchkit,代码行数:8,代码来源:NavigationButtonConnector.java
示例18: layoutClick
import com.vaadin.shared.Connector; //导入依赖的package包/类
@Override
public void layoutClick(MouseEventDetails mouseEventDetails, Connector connector) {
fireEvent(LayoutEvents.LayoutClickEvent.createEvent(GridStackLayout.this,
mouseEventDetails, connector));
}
开发者ID:alump,项目名称:GridStack,代码行数:6,代码来源:GridStackLayout.java
示例19: getPreviousComponent
import com.vaadin.shared.Connector; //导入依赖的package包/类
public Connector getPreviousComponent() {
return previousComponent;
}
开发者ID:vaadin,项目名称:touchkit,代码行数:4,代码来源:NavigationManagerSharedState.java
示例20: setPreviousComponent
import com.vaadin.shared.Connector; //导入依赖的package包/类
public void setPreviousComponent(Connector previousComponent) {
this.previousComponent = previousComponent;
}
开发者ID:vaadin,项目名称:touchkit,代码行数:4,代码来源:NavigationManagerSharedState.java
注:本文中的com.vaadin.shared.Connector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论