本文整理了Java中com.google.gwt.user.client.ui.Widget.isOrWasAttached()
方法的一些代码示例,展示了Widget.isOrWasAttached()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.isOrWasAttached()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Widget
类名称:Widget
方法名:isOrWasAttached
[英]Has this widget ever been attached?
[中]这个小部件曾经被连接过吗?
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public void unsinkEvents(int eventBitsToRemove) {
if (isOrWasAttached()) {
super.unsinkEvents(eventBitsToRemove);
} else {
eventsToSink &= ~eventBitsToRemove;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Overridden to defer the call to super.sinkEvents until the first time this
* widget is attached to the dom, as a performance enhancement. Subclasses
* wishing to customize sinkEvents can preserve this deferred sink behavior by
* putting their implementation behind a check of
* <code>isOrWasAttached()</code>:
*
* <pre>
* {@literal @}Override
* public void sinkEvents(int eventBitsToAdd) {
* if (isOrWasAttached()) {
* /{@literal *} customized sink code goes here {@literal *}/
* } else {
* super.sinkEvents(eventBitsToAdd);
* }
*} </pre>
*/
@Override
public void sinkEvents(int eventBitsToAdd) {
if (isOrWasAttached()) {
super.sinkEvents(eventBitsToAdd);
} else {
eventsToSink |= eventBitsToAdd;
}
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public void unsinkEvents(int eventBitsToRemove) {
if (isOrWasAttached()) {
super.unsinkEvents(eventBitsToRemove);
} else {
eventsToSink &= ~eventBitsToRemove;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public void unsinkEvents(int eventBitsToRemove) {
if (isOrWasAttached()) {
super.unsinkEvents(eventBitsToRemove);
} else {
eventsToSink &= ~eventBitsToRemove;
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Overridden to defer the call to super.sinkEvents until the first time this
* widget is attached to the dom, as a performance enhancement. Subclasses
* wishing to customize sinkEvents can preserve this deferred sink behavior by
* putting their implementation behind a check of
* <code>isOrWasAttached()</code>:
*
* <pre>
* {@literal @}Override
* public void sinkEvents(int eventBitsToAdd) {
* if (isOrWasAttached()) {
* /{@literal *} customized sink code goes here {@literal *}/
* } else {
* super.sinkEvents(eventBitsToAdd);
* }
*} </pre>
*/
@Override
public void sinkEvents(int eventBitsToAdd) {
if (isOrWasAttached()) {
super.sinkEvents(eventBitsToAdd);
} else {
eventsToSink |= eventBitsToAdd;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Overridden to defer the call to super.sinkEvents until the first time this
* widget is attached to the dom, as a performance enhancement. Subclasses
* wishing to customize sinkEvents can preserve this deferred sink behavior by
* putting their implementation behind a check of
* <code>isOrWasAttached()</code>:
*
* <pre>
* {@literal @}Override
* public void sinkEvents(int eventBitsToAdd) {
* if (isOrWasAttached()) {
* /{@literal *} customized sink code goes here {@literal *}/
* } else {
* super.sinkEvents(eventBitsToAdd);
* }
*} </pre>
*/
@Override
public void sinkEvents(int eventBitsToAdd) {
if (isOrWasAttached()) {
super.sinkEvents(eventBitsToAdd);
} else {
eventsToSink |= eventBitsToAdd;
}
}
内容来源于网络,如有侵权,请联系作者删除!