本文整理汇总了Java中com.google.gwt.dom.client.Style.Cursor方法的典型用法代码示例。如果您正苦于以下问题:Java Style.Cursor方法的具体用法?Java Style.Cursor怎么用?Java Style.Cursor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.dom.client.Style
的用法示例。
在下文中一共展示了Style.Cursor方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSetCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
@Test
public void testSetCursor() {
final Viewport viewport = mock(Viewport.class);
final DivElement divElement = mock(DivElement.class);
final Style.Cursor cursor = mock(Style.Cursor.class);
final Style style = mock(Style.class);
doReturn(style).when(divElement).getStyle();
doReturn(divElement).when(viewport).getElement();
doReturn(viewport).when(mediator).getLayerViewport();
mediator.setCursor(cursor);
verify(style).setCursor(cursor);
}
示例2: fromCssName
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public static Style.Cursor fromCssName(String cssName) {
for(Style.Cursor cursor : Style.Cursor.values()) {
if(cursor.getCssName().equals(cssName)) {
return cursor;
}
}
return Style.Cursor.AUTO;
}
示例3: convert
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public static Style.Cursor convert(CursorOwn in) {
switch (in) {
case N:
return Style.Cursor.N_RESIZE;
case NE:
return Style.Cursor.NE_RESIZE;
case E:
return Style.Cursor.E_RESIZE;
case SE:
return Style.Cursor.SE_RESIZE;
case S:
return Style.Cursor.S_RESIZE;
case SW:
return Style.Cursor.SW_RESIZE;
case W:
return Style.Cursor.W_RESIZE;
case NW:
return Style.Cursor.NW_RESIZE;
case HAND:
return Style.Cursor.POINTER;
case MOVE:
return Style.Cursor.MOVE;
case DEFAULT:
return Style.Cursor.DEFAULT;
case CROSS:
return Style.Cursor.CROSSHAIR;
case TEXT:
return Style.Cursor.TEXT;
default:
throw new RuntimeException("Unknown Cursor: " + in);
}
}
示例4: setCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
private void setCursor(final Style.Cursor cursor) {
for (IMediator mediator : layer.getViewport().getMediators()) {
if (mediator instanceof RestrictedMousePanMediator) {
if (((RestrictedMousePanMediator) mediator).isDragging()) {
return;
}
}
}
layer.getViewport().getElement().getStyle().setCursor(cursor);
state.setCursor(cursor);
}
示例5: getCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
public Style.Cursor getCursor() {
return CursorUtil.fromCssName((String)getOption("cursor"));
}
示例6: setCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
/**
* The CSS cursor during the drag operation.
*/
public void setCursor(Style.Cursor cursor) {
setOption("cursor", cursor);
}
示例7: setCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
private void setCursor(final Style.Cursor cursor) {
layer.getViewport().getElement().getStyle().setCursor(cursor);
state.setCursor(cursor);
}
示例8: setCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
protected void setCursor(final Style.Cursor cursor) {
getLayerViewport().getElement().getStyle().setCursor(cursor);
}
示例9: getHoverCursorStyle
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
@Override
protected Style.Cursor getHoverCursorStyle() {
return Style.Cursor.COL_RESIZE;
}
示例10: getCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
/**
* Returns the Cursor type to be shown for the current operation. This primarily used in conjunction with DOMElement based cells.
* When the pointer moves over a DOM element the browser determines the Cursor to show based on the DOM element's CSS. This
* however can be different to the pointer required during, for example, a column resize operation. In such cases the
* browser changes the pointer to that defined by CSS replacing that set by the MouseMove handler.
* @return
*/
public Style.Cursor getCursor() {
return cursor;
}
示例11: setCursor
import com.google.gwt.dom.client.Style; //导入方法依赖的package包/类
/**
* Sets the Cursor type to be shown for the current operation.
* @param cursor
*/
public void setCursor(Style.Cursor cursor) {
this.cursor = cursor;
}