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


Java Event.ONMOUSEOUT屬性代碼示例

本文整理匯總了Java中com.google.gwt.user.client.Event.ONMOUSEOUT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Event.ONMOUSEOUT屬性的具體用法?Java Event.ONMOUSEOUT怎麽用?Java Event.ONMOUSEOUT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.google.gwt.user.client.Event的用法示例。


在下文中一共展示了Event.ONMOUSEOUT屬性的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

public void onBrowserEvent(Event event) {
	int x = 10 + event.getClientX() + getElement().getOwnerDocument().getScrollLeft();
	int y = 10 + event.getClientY() + getElement().getOwnerDocument().getScrollTop();
	
	switch (DOM.eventGetType(event)) {
	case Event.ONMOUSEMOVE:
		if (iHint.isShowing()) {
			iHint.setPopupPosition(x, y);
		} else {
			iShowHint.cancel();
			iHint.setPopupPosition(x, y);
			iShowHint.schedule(1000);
		}
		break;
	case Event.ONMOUSEOUT:
		iShowHint.cancel();
		if (iHint.isShowing())
			iHideHint.schedule(1000);
		break;
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:21,代碼來源:HorizontalPanelWithHint.java

示例4: onBrowserEvent

public void onBrowserEvent(Event event) {
	if (iHint.getText().isEmpty()) return;
	iX = 10 + event.getClientX() + getElement().getOwnerDocument().getScrollLeft();
	iY = 10 + event.getClientY() + getElement().getOwnerDocument().getScrollTop();
	
	switch (DOM.eventGetType(event)) {
	case Event.ONMOUSEMOVE:
		if (iInfoPanel.isShowing()) {
			int maxX = Window.getScrollLeft() + Window.getClientWidth() - iInfoPanel.getOffsetWidth() - 10;
			iInfoPanel.setPopupPosition(Math.min(iX, maxX), iY);
		} else if (iInfo.getRowCount() > 0) {
			iShowInfo.cancel();
			iShowInfo.schedule(1000);
		}
		break;
	case Event.ONMOUSEOUT:
		iShowInfo.cancel();
		if (iInfoPanel.isShowing())
			iHideInfo.schedule(1000);
		break;
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:22,代碼來源:InfoPanelImpl.java

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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