本文整理匯總了Java中com.google.gwt.event.dom.client.MouseOverEvent類的典型用法代碼示例。如果您正苦於以下問題:Java MouseOverEvent類的具體用法?Java MouseOverEvent怎麽用?Java MouseOverEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MouseOverEvent類屬於com.google.gwt.event.dom.client包,在下文中一共展示了MouseOverEvent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onMouseDown
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@Override
public void onMouseDown(MouseDownEvent event) {
this.onMouseUp(null);
Icon dragIcon = (Icon) event.getSource();
this.selectedRow = (TableRow<T>) dragIcon.getParent().getParent();
this.body = (TableEditorBody<T>) this.selectedRow.getParent();
this.overRegistration = new HandlerRegistrationCollection();
this.upRegistration = RootPanel.get().addDomHandler(this, MouseUpEvent.getType());
this.rows = Lists.newArrayList(this.body.getRows());
for (TableRow<T> row : this.rows) {
this.overRegistration.add(row.addDomHandler(this, MouseOverEvent.getType()));
}
TableOrder.this.disableTextSelection(true);
RootPanel.get().getElement().getStyle().setCursor(Style.Cursor.MOVE);
StyleUtils.addStyle(this.selectedRow, TableOrder.STYLE_ROW_DRAGING);
}
示例2: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
public void onMouseOver(final MouseOverEvent event)
{
HighlightedResult widget = (HighlightedResult) event.getSource();
HighlightedGroup group = widget.getHighlightedGroup();
if (group.getGroup() != null)
{
widget.setMouseOverEvent(event);
if (!hasHighlightedChildren(widget))
{
area.setSelectionRange(0, 0);
int start = group.getGroup().getRegexFragment().getStart();
int length = group.getGroup().getRegexFragment().getCaptured().length + 2;
if (start + length > area.getText().length())
length = area.getText().length() - start;
area.setSelectionRange(start, length);
}
}
}
示例3: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@Override
public void onMouseOver(MouseOverEvent event) {
if( SiteManager.isUserLoggedIn() ) {
//If the user is logged in, then
if( SiteManager.getUserID() == userID ) {
//If this is the avatar of the user who is logged in
if( AvatarSpoilersHelper.isAvatarSpoilerActive( spoilerID, spoilerExpDate ) ) {
//If this user is pranked he can clean his prank
activateControls( false , true );
} else {
//If this user is NOT pranked then there is nothing to be done
activateControls( false , false );
}
} else {
//If this is an avatar of some other user
if( AvatarSpoilersHelper.isAvatarSpoilerActive( spoilerID, spoilerExpDate ) ) {
//If the other user is pranked then one can clean his prank or set a new one
activateControls( true , true );
} else {
//If the other user is NOT pranked then one can prank him
activateControls( true , false );
}
}
}
}
示例4: ConsoleButtonImpl
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@Inject
public ConsoleButtonImpl(
ButtonResources resources,
TooltipWidget tooltip,
@NotNull @Assisted String prompt,
@NotNull @Assisted SVGResource image) {
this.resources = resources;
this.tooltip = tooltip;
this.tooltip.setDescription(prompt);
resources.buttonCss().ensureInjected();
initWidget(UI_BINDER.createAndBindUi(this));
icon = new SVGImage(image);
icon.getElement().setAttribute("class", resources.buttonCss().mainButtonIcon());
setCheckedStatus(false);
addDomHandler(this, ClickEvent.getType());
addDomHandler(this, MouseOutEvent.getType());
addDomHandler(this, MouseOverEvent.getType());
}
示例5: getEndPointDetails
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
private Widget getEndPointDetails(final String css, Date time,
String address, final Wgs84LatLonBean position) {
HTML line = new HTML();
line.addStyleName("itinerary-details-line");
line.addStyleName("itinerary-details-" + css);
line.addStyleName(css + "-icon");
String html = "<span class='time'>" + FormatUtils.formatTime(time)
+ "</span> - " + FormatUtils.formatAddress(address);
line.setHTML(html);
final String infoHtml = "<div class='info-panel-" + css + " " + css
+ "-icon'>" + html + "</div>";
line.addMouseOverHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
if (selected)
listener.onItineraryStepClicked(infoHtml, position);
}
});
return line;
}
示例6: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
public void onMouseOver(MouseOverEvent event) {
Widget widget = (Widget) event.getSource();
if (doHilite) {
GwtUtil.setStyle(widget, "backgroundColor", hiliteBackground);
GwtUtil.setStyle(widget, "border", "1px solid " + hiliteBorder);
}
BasicImageGrid.this.setMouseOverAt(widget);
mouseOverTimer.schedule(1500);
}
示例7: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
public void onMouseOver(MouseOverEvent event) {
Widget widget = (Widget)event.getSource();
DOM.setStyleAttribute(widget.getElement(), "backgroundColor", "#bde");
DOM.setStyleAttribute(widget.getElement(), "border", "1px solid #abc");
ImageGridPanel.this.setMouseOverAt(widget);
mouseOverTimer.schedule(1500);
}
示例8: createButton
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
void createButton() {
itemButton.setSize(ButtonSize.SMALL);
itemButton.setType(ButtonType.LINK);
configureIcon(itemButton,
getDock().getImageIcon());
mouseEventHandler = new MouseEventHandler();
itemButton.addDomHandler(mouseEventHandler,
MouseOverEvent.getType());
itemButton.addStyleName(CSS.CSS().sideDockItem());
itemButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (!isOpened()) {
openAndExecuteExpandCommand();
} else {
closeAndExecuteCommand();
}
}
});
}
示例9: setMouseEntered
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
public void setMouseEntered(JavaScriptObject aValue) {
if (mouseEntered != aValue) {
if (mouseOverReg != null) {
mouseOverReg.removeHandler();
mouseOverReg = null;
}
mouseEntered = aValue;
if (mouseEntered != null) {
MouseOverHandler handler = new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
if (mouseEntered != null) {
event.stopPropagation();
executeEvent(mouseEntered, EventsPublisher.publish(event));
}
}
};
if (component instanceof Widget) {
mouseOverReg = ((Widget) component).addDomHandler(handler, MouseOverEvent.getType());
} else if (component instanceof HasMouseOverHandlers) {
mouseOverReg = ((HasMouseOverHandlers) component).addMouseOverHandler(handler);
}
}
}
}
示例10: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public void onMouseOver(final MouseOverEvent event) {
popupHideTimer.cancel();
if (popupShowTimer != null) {
popupShowTimer.cancel();
}
popupShowTimer = new TypedTimer((ContextField<T>) event.getSource());
popupShowTimer.schedule(popupPanel.isShowing() ? 0 : POPUP_SHOW_DELAY);
}
示例11: onClick
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public void onClick(final ClickEvent event) {
if (selectedField != null) {
selectedField.setSelected(false);
}
if (selectedField == event.getSource()) {
selectedField = null;
return;
}
selectedField = (ContextField<T>) event.getSource();
selectedField.setSelected(true);
selectedField.fireEvent(new MouseOverEvent() {});
}
示例12: bindHandlers
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
private void bindHandlers() {
if (this.widget == null) {
return;
}
this.registrations.removeHandler();
switch (this.getTrigger()) {
case FOCUS:
this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, FocusEvent.getType()));
this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, BlurEvent.getType()));
break;
case HOVER:
this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, MouseOverEvent.getType()));
this.registrations.add(this.widget.addDomHandler(this.triggerEventHandler, MouseOutEvent.getType()));
break;
case MANUAL:
break;
default:
break;
}
}
示例13: onMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@Override
public void onMouseOver(MouseOverEvent event) {
if (event.getNativeButton() == NativeEvent.BUTTON_LEFT) {
this.hoverRow = (TableRow<T>) event.getSource();
this.body.switchRows(this.hoverRow, this.selectedRow);
}
event.preventDefault();
}
示例14: setAutoPlay
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
public void setAutoPlay(boolean autoPlay) {
this.autoPlay = autoPlay;
this.handlerRegistrations.removeHandler();
if (autoPlay) {
this.autoPlayTimer.scheduleRepeating(this.timerDelay);
this.handlerRegistrations.add(this.addDomHandler(this, MouseOverEvent.getType()));
this.handlerRegistrations.add(this.addDomHandler(this, MouseOutEvent.getType()));
} else {
this.autoPlayTimer.cancel();
}
}
示例15: doMouseOver
import com.google.gwt.event.dom.client.MouseOverEvent; //導入依賴的package包/類
@UiHandler("popupObjectButton")
void doMouseOver(MouseOverEvent event) {
if(active) {
borderImage.setResource(AtomClientBundle.INSTANCE.menuPopupOver());
popupObjectButton.setStyleName(popupObjectButtonStyle.over());
panel.setStyleName(popupObjectButtonStyle.activeSpace());
}
}