当前位置: 首页>>代码示例>>Java>>正文


Java Event.ONMOUSEOVER属性代码示例

本文整理汇总了Java中com.google.gwt.user.client.Event.ONMOUSEOVER属性的典型用法代码示例。如果您正苦于以下问题:Java Event.ONMOUSEOVER属性的具体用法?Java Event.ONMOUSEOVER怎么用?Java Event.ONMOUSEOVER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.gwt.user.client.Event的用法示例。


在下文中一共展示了Event.ONMOUSEOVER属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBrowserEvent

public void onBrowserEvent(final Event event) {
	Element td = getEventTargetCell(event);
	if (td==null) return;
    final Element tr = DOM.getParent(td);
	int col = DOM.getChildIndex(tr, td);
    Element body = DOM.getParent(tr);
    int row = DOM.getChildIndex(body, tr);
    
    Widget widget = getWidget(row, col);
    if (widget != null && widget instanceof UniTimeHeaderPanel) {
    	super.onBrowserEvent(event);
    	return;
    }
    
	switch (DOM.eventGetType(event)) {
	case Event.ONMOUSEOVER:
		getRowFormatter().addStyleName(row, "hover");
		break;
	case Event.ONMOUSEOUT:
		getRowFormatter().removeStyleName(row, "hover");
		break;
	}
	
	super.onBrowserEvent(event);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:25,代码来源:SimpleEditPage.java

示例2: onBrowserEvent

public void onBrowserEvent(Event event) {
	EventTarget related = event.getRelatedEventTarget();
    switch (DOM.eventGetType(event)) {
	case Event.ONCLICK:
		if (getCell().hasId() && getCell().getType() == TimetableGridCell.Type.Class) {
			UniTimeFrameDialog.openDialog(MESSAGES.dialogSuggestions(), "suggestions.do?id=" + getCell().getId() + "&op=Reset","900","90%");
			select(false);
		}
		break;
	case Event.ONMOUSEOVER:
        if (related == null || !getElement().isOrHasChild((Element)related.cast())) {
			select(true);
        }
		break;
	case Event.ONMOUSEOUT:
        if (related == null || !getElement().isOrHasChild((Element)related.cast())) {
        	select(false);
        }
		break;
	}
   
    super.onBrowserEvent(event);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:23,代码来源:TimetableGrid.java

示例3: onBrowserEvent

/**
 * Invoked by GWT whenever a browser event is dispatched to this component.
 */
@Override
public final void onBrowserEvent(Event event) {
  switch (event.getTypeInt()) {
    case Event.ONMOUSEDOWN:
    case Event.ONMOUSEUP:
    case Event.ONMOUSEMOVE:
    case Event.ONMOUSEOVER:
    case Event.ONMOUSEOUT:
      cancelBrowserEvent(event);
      mouseListeners.fireMouseEvent(this, event);
      break;

    case Event.ONCLICK:
      cancelBrowserEvent(event);
      select();
      break;

    default:
      // Ignore unexpected events
      break;
  }
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:25,代码来源:MockComponent.java

示例4: onBrowserEvent

@Override
public void onBrowserEvent(Event event) {
	super.onBrowserEvent(event);
	Element td = getEventTargetCell(event);
	if (td == null)
		return;
	Element tr = DOM.getParent(td);

	switch (DOM.eventGetType(event)) {
		case Event.ONMOUSEOVER:
			tr.addClassName(ROW_STYLE_NAME + "-mouseover");
			break;

		case Event.ONMOUSEOUT: {
			tr.removeClassName(ROW_STYLE_NAME + "-mouseover");
			break;
		}
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:19,代码来源:ColoredFlexTable.java

示例5: onBrowserEvent

public void onBrowserEvent(Event event) {
	switch (DOM.eventGetType(event)) {
		case Event.ONMOUSEDOWN:
		case Event.ONMOUSEUP:
		case Event.ONMOUSEMOVE:
		case Event.ONMOUSEOVER:
			if (!super.getUrl().equals(urlHover)) {
				super.setUrl(urlHover);
			}
			break;
		case Event.ONMOUSEOUT: {
			if (!super.getUrl().equals(url)) {
				super.setUrl(url);
			}
			break;
		}

	}
	super.onBrowserEvent(event);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:ImageHover.java

示例6: onBrowserEvent

@Override
public void onBrowserEvent(Event event) {
    super.onBrowserEvent(event);

    if (isEnabled()) {
        switch (DOM.eventGetType(event)) {
            case Event.ONMOUSEOVER:
                Element targetElement = DOM.eventGetTarget(event);
                Object targetWidget = WidgetUtil.findWidget(targetElement, null);
                if (targetWidget instanceof MenuItemWidget) {
                    setFocusedItem((MenuItemWidget) targetWidget);
                }
                break;
            case Event.ONMOUSEOUT:
                if (!focused) {
                    setFocusedItem(null);
                }
                break;
        }
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:21,代码来源:CubaSideMenuWidget.java

示例7: onBrowserEvent

@Override
public void onBrowserEvent(Event event) {
    if (BrowserInfo.get().isIE9()) {
        int type = DOM.eventGetType(event);
        switch (type) {
            case Event.ONMOUSEOVER:
                if (isEnabled() && !getStyleName().contains("ie9-hover")) {
                    addStyleName("ie9-hover");
                }
                break;
            case Event.ONMOUSEOUT:
                if (getStyleName().contains("ie9-hover")) {
                    removeStyleName("ie9-hover");
                }
                break;
        }
    }

    super.onBrowserEvent(event);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:20,代码来源:CubaButtonWidget.java

示例8: onBrowserEvent

public void onBrowserEvent(Event event) {
	Element td = getEventTargetCell(event);
	if (td==null) return;
    Element tr = DOM.getParent(td);
    Element body = DOM.getParent(tr);
    final int row = DOM.getChildIndex(body, tr);

    final ChainedCommand command = iRowClicks.get(row);
    
    switch (DOM.eventGetType(event)) {
	case Event.ONMOUSEOVER:
		getRowFormatter().setStyleName(row, "unitime-TableRowHover");
		if (command == null) getRowFormatter().getElement(row).getStyle().setCursor(Cursor.AUTO);
		break;
	case Event.ONMOUSEOUT:
		getRowFormatter().setStyleName(row, null);	
		break;
	case Event.ONCLICK:
		if (command == null) break;
		if (command.getLoadingMessage() != null)
			LoadingWidget.getInstance().show(command.getLoadingMessage());
		getRowFormatter().setStyleName(row, "unitime-TableRowSelected");
		iSelectedRow = row;
		command.execute(new ConditionalCommand() {
			@Override
			public void executeOnSuccess() {
				//getRowFormatter().setStyleName(row, null);	
				if (command.getLoadingMessage() != null)
					LoadingWidget.getInstance().hide();
			}
			@Override
			public void executeOnFailure() {
				getRowFormatter().setStyleName(row, "unitime-TableRowHover");	
				if (command.getLoadingMessage() != null)
					LoadingWidget.getInstance().hide();
			}
		});
		break;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:40,代码来源:CourseCurriculaTable.java

示例9: onBrowserEvent

@Override
public void onBrowserEvent(Event event) {
	
	// If we're not yet dragging, only trigger mouse events if the event occurs
	// in the caption wrapper
	if (this.resizable) {
		switch (event.getTypeInt()) {
		case Event.ONMOUSEDOWN:
		case Event.ONMOUSEUP:
		case Event.ONMOUSEMOVE:
		case Event.ONMOUSEOVER:
		case Event.ONMOUSEOUT:
			
			if (this.dragMode >= 0 || calcDragMode(event.getClientX(),event.getClientY()) >= 0) {
				// paste'n'copy from Widget.onBrowserEvent
				switch (DOM.eventGetType(event)) {
				case Event.ONMOUSEOVER:
					// Only fire the mouse over event if it's coming from outside this
					// widget.
				case Event.ONMOUSEOUT:
					// Only fire the mouse out event if it's leaving this
					// widget.
					Element related = event.getRelatedEventTarget().cast();
					if (related != null && getElement().isOrHasChild(related)) {
						return;
					}
					break;
				}
				DomEvent.fireNativeEvent(event, this, this.getElement());
				return;
			}
			if (this.dragMode<0)
				this.updateCursor(this.dragMode);
		}
	}
	
	super.onBrowserEvent(event);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:38,代码来源:WindowBox.java

示例10: asString

public static String asString(Event event) {
  // Start with the event type string
  String string = DOM.eventGetTypeString(event);
  // Next type-specific fields
  switch (event.getTypeInt()) {
  case Event.ONKEYPRESS:
  case Event.ONKEYUP:
  case Event.ONKEYDOWN:
    string += key(event) + modifiers(event);
    break;
  case Event.ONCLICK:
  case Event.ONDBLCLICK:
  case Event.ONMOUSEMOVE:
    string += mousePoint(event) + modifiers(event);
    break;
  case Event.ONMOUSEDOWN:
  case Event.ONMOUSEUP:
    string += mousePoint(event) + mouseButtons(event) + modifiers(event);
    break;
  case Event.ONMOUSEOUT:
    string += mousePoint(event) + modifiers(event) + " to: " + getToElement(event);
    break;
  case Event.ONMOUSEOVER:
    string += mousePoint(event) + modifiers(event) + " from: " + getFromElement(event);
    break;
  case Event.ONMOUSEWHEEL:
    string += " " + getMouseWheelVelocityY(event) + mousePoint(event) + modifiers(event);
    break;
  case Event.ONFOCUS:
  case Event.ONBLUR:
  case Event.ONCHANGE:
  case Event.ONERROR:
  case Event.ONLOAD:
  case Event.ONLOSECAPTURE:
  case Event.ONSCROLL:
    break;
  }
  return string;
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:39,代码来源:EventWrapper.java

示例11: onBrowserEvent

@Override
public void onBrowserEvent(Event event) {
  if (mouseListener == null) {
    super.onBrowserEvent(event);
    return;
  }

  switch (event.getTypeInt()) {
    case Event.ONMOUSEDOWN:
      mouseListener.onMouseDown();
      break;
    case Event.ONMOUSEOUT:
      mouseListener.onMouseLeave();
      break;
    case Event.ONMOUSEOVER:
      mouseListener.onMouseEnter();
      break;
    case Event.ONMOUSEUP:
      mouseListener.onMouseUp();
      break;
    case Event.ONCLICK:
      mouseListener.onClick();
      if (stopPropagation) {
        event.stopPropagation();
      }
      break;
  }
  super.onBrowserEvent(event);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:29,代码来源:TextButton.java

示例12: onBrowserEvent

/**
 * Overrides the same method as per Label. Updates the CSS style on the parent
 * DIV, and then passes on control to the superclass implementation.
 *
 * @see com.google.gwt.user.client.ui.Label#onBrowserEvent(com.google.gwt.user.client.Event)
 */
@Override
public void onBrowserEvent(Event event) {

  switch (event.getTypeInt()) {
  case Event.ONMOUSEDOWN:
    me.replaceClassName(ButtonStyle.mouseUp, ButtonStyle.mouseDown);
    if (cancelMouseDownBubble) {
      event.stopPropagation();
    }
    if (preventMouseDownDefault) {
      event.preventDefault();
    }
    break;
  case Event.ONMOUSEUP:
    me.replaceClassName(ButtonStyle.mouseDown, ButtonStyle.mouseUp);
    break;
  case Event.ONMOUSEOVER:
    me.replaceClassName(ButtonStyle.mouseOut, ButtonStyle.mouseOver);
    break;
  case Event.ONMOUSEOUT:
    me.replaceClassName(ButtonStyle.mouseOver, ButtonStyle.mouseOut);
    break;
  }

  // Call to super to handle all event generation.
  super.onBrowserEvent(event);
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:33,代码来源:Button.java

示例13: onBrowserEvent

public void onBrowserEvent(Event event) { 
    if(event.getTypeInt() == Event.ONMOUSEOVER){ 
        iAnchor.getStyle().setProperty("cursor", "hand"); 
    } 
    super.onBrowserEvent(event); 
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:6,代码来源:ImageLink.java

示例14: processMouseEvent

private void processMouseEvent(int eventType, int day, int period) {
    switch (eventType) {
	case Event.ONMOUSEDOWN:
		iDownDay = day; iDownPeriod = period; iOverDay = day; iOverPeriod = period;
		break;
	case Event.ONMOUSEUP:
		if (iDownDay>=0 && iOverDay>=0) {
			int d0 = (iDownDay < iOverDay ? iDownDay : iOverDay);
			int d1 = (iDownDay < iOverDay ? iOverDay : iDownDay);
			int p0 = (iDownPeriod < iOverPeriod ? iDownPeriod : iOverPeriod);
			int p1 = (iDownPeriod < iOverPeriod ? iOverPeriod : iDownPeriod);
			boolean allSelected = true;
			boolean mwfDown = (iDownDay % 2 == 0);
			all: for (int d=d0; d<=d1; d++) {
				if (d1 - d0 <= 0 || (d % 2 == 0) == mwfDown) {
					for (int p=p0; p<=p1; p++)
						if (!iSelected[d][p]) {
							allSelected = false; break all;
						}
				}
			}
			long ts = iTime++;
			for (int d=d0; d<=d1; d++) {
				if (d1 - d0 <= 1 || (d % 2 == 0) == mwfDown) {
					for (int p=p0; p<=p1; p++) {
						iSelected[d][p] = !allSelected;
						iLastSelectedTime[d][p] = ts;
					}
				}
			}
		}
		iDownDay = -1; iDownPeriod = -1; iOverDay = -1; iOverPeriod = -1;
		generatePriorities();
		ValueChangeEvent.fire(this, getValue());
		break;
	case Event.ONMOUSEOVER:
		iOverDay = day; iOverPeriod = period;
		break;
	case Event.ONMOUSEOUT:
		iOverDay = -1; iOverPeriod = -1;
		break;
	}
	update();
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:44,代码来源:FreeTimePicker.java

示例15: onBrowserEvent

public void onBrowserEvent(Event event) {
	if (iDummy) return;
    Element target = DOM.eventGetTarget(event);
    boolean anchor = false;
    for (; target != null; target = DOM.getParent(target)) {
    	String tag = target.getPropertyString("tagName");
    	if ("a".equalsIgnoreCase(tag)) {
    		anchor = true;
    		break;
    	} else if ("div".equalsIgnoreCase(tag)) {
    		break;
    	}
    }
	EventTarget related = event.getRelatedEventTarget();
    switch (DOM.eventGetType(event)) {
	case Event.ONCLICK:
		select(false);
		if (!anchor) {
			MeetingClickEvent e = new MeetingClickEvent(Meeting.this);
			for (MeetingClickHandler h: iMeetingClickHandlers)
				h.onMeetingClick(e);
		}
		break;
	case Event.ONMOUSEOVER:
        if (related == null || !getElement().isOrHasChild((Element)related.cast())) {
			select(true);
        }
		break;
	case Event.ONMOUSEOUT:
        if (related == null || !getElement().isOrHasChild((Element)related.cast())) {
        	select(false);
        }
		break;
	case Event.ONMOUSEMOVE:
		int relativeX = event.getClientX() - getElement().getAbsoluteLeft() + getElement().getScrollLeft() + getElement().getOwnerDocument().getScrollLeft();
		if (relativeX < iLeft - 6 - getDay() * iCellWidth || relativeX > iLeft - 2 - getDay() * iCellWidth + iWidth) {
			select(false);
		}
		break;
	}
    super.onBrowserEvent(event);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:42,代码来源:TimeGrid.java


注:本文中的com.google.gwt.user.client.Event.ONMOUSEOVER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。