當前位置: 首頁>>代碼示例>>Java>>正文


Java MouseOverEvent類代碼示例

本文整理匯總了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);
}
 
開發者ID:Putnami,項目名稱:putnami-web-toolkit,代碼行數:19,代碼來源:TableOrder.java

示例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);
      }
   }
}
 
開發者ID:ocpsoft,項目名稱:regex-tester,代碼行數:22,代碼來源:ResultMouseOverHandler.java

示例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 );
			}
		}
	}
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:26,代碼來源:UserAvatarImageWidget.java

示例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());
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:24,代碼來源:ConsoleButtonImpl.java

示例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;
}
 
開發者ID:mecatran,項目名稱:OpenTripPlanner-client-gwt,代碼行數:22,代碼來源:ItineraryDetailsWidget.java

示例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);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:10,代碼來源:BasicImageGrid.java

示例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);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:8,代碼來源:ImageGridPanel.java

示例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();
            }
        }
    });
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:21,代碼來源:SideDockItem.java

示例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);
			}
		}
	}
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:26,代碼來源:EventsExecutor.java

示例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);
}
 
開發者ID:JornC,項目名稱:bitcoin-transaction-explorer,代碼行數:13,代碼來源:ContextFieldSet.java

示例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() {});
}
 
開發者ID:JornC,項目名稱:bitcoin-transaction-explorer,代碼行數:18,代碼來源:ContextFieldSet.java

示例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;
	}
}
 
開發者ID:Putnami,項目名稱:putnami-web-toolkit,代碼行數:22,代碼來源:AbstractHover.java

示例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();
}
 
開發者ID:Putnami,項目名稱:putnami-web-toolkit,代碼行數:9,代碼來源:TableOrder.java

示例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();
	}
}
 
開發者ID:Putnami,項目名稱:putnami-web-toolkit,代碼行數:12,代碼來源:Carousel.java

示例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());
	}
}
 
開發者ID:fhcampuswien,項目名稱:atom,代碼行數:9,代碼來源:PopupObjectButton.java


注:本文中的com.google.gwt.event.dom.client.MouseOverEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。