当前位置: 首页>>代码示例>>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;未经允许,请勿转载。