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


Java Cursor类代码示例

本文整理汇总了Java中com.google.gwt.dom.client.Style.Cursor的典型用法代码示例。如果您正苦于以下问题:Java Cursor类的具体用法?Java Cursor怎么用?Java Cursor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setActiveTool

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private void setActiveTool(String toolname) {
 if(toolname.equals("pan")) {
     m_svgDragHandlerManager.setCurrentDragHandler(PanHandler.DRAG_BEHAVIOR_KEY);
     m_topologyView.getSVGElement().getStyle().setCursor(Cursor.MOVE);
 }else if(toolname.equals("select")) {
     m_svgDragHandlerManager.setCurrentDragHandler(MarqueeSelectHandler.DRAG_BEHAVIOR_KEY);
     m_topologyView.getSVGElement().getStyle().setCursor(Cursor.CROSSHAIR);
 }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:10,代码来源:VTopologyComponent.java

示例2: createDrag

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private void createDrag(W widget) {
    DraggableOptions options = new DraggableOptions();
    options.setHelper(HelperType.CLONE);
    options.setRevert(RevertOption.ON_INVALID_DROP);
    options.setCursor(Cursor.MOVE);
    options.setZIndex(DRAG_Z_INDEX);
    options.setContainment(".qp-player");
    if (widget instanceof DraggableWidget) {
        dragWidget = (DraggableWidget<W>) widget;
    } else {
        dragWidget = new DraggableWidget<W>(widget, options);
    }
    dragWidget.setDraggableOptions(options);
    dragWidget.setDraggingOpacity(.8f);

}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:17,代码来源:EmulatedDragDrop.java

示例3: init

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
public void init() {

		uploader.setButtonImageURL("img/uploadimg.png").setButtonWidth(32)
		.setButtonHeight(32)
		.setButtonCursor(Uploader.Cursor.HAND);

		horizontalPanel.setStyleName("bda-fileupload-bottom-hpanel");
		horizontalPanel.setSpacing(10);
		horizontalPanel.add(uploader);
		if (Uploader.isAjaxUploadWithProgressEventsSupported()) {

			dropFilesLabel.getElement().getStyle().setCursor(Cursor.POINTER);
			dropFilesLabel.setSize("32px", "32px");
			dropFilesLabel.setTitle("File dragable upload area");
		}
		horizontalPanel.add(dropFilesLabel);
		horizontalPanel.add(progressBarPanel);
		horizontalPanel.setCellVerticalAlignment(progressBarPanel,
				HasVerticalAlignment.ALIGN_MIDDLE);
		this.add(horizontalPanel);
		initFacet();
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:23,代码来源:FileUploader.java

示例4: cursor

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private Cursor cursor(double x, double y) {
	if (x <= 6) {
		if (y <= 6)
			return Cursor.NW_RESIZE;
		else if (y >= getHeight() - 6)
			return Cursor.SW_RESIZE;
		else
			return Cursor.W_RESIZE;
	} else if (x >= getWidth() - 6) {
		if (y <= 6)
			return Cursor.NE_RESIZE;
		else if (y >= getHeight() - 6)
			return Cursor.SE_RESIZE;
		else
			return Cursor.E_RESIZE;
	} else if (y <= 6) {
		return Cursor.N_RESIZE;
	} else if (y >= getHeight() - 6) {
		return Cursor.S_RESIZE;
	} else {
		return Cursor.MOVE;
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:24,代码来源:TimeGrid.java

示例5: endDragging

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
@Override
protected void endDragging(MouseUpEvent event) {
	if (this.dragMode >= 0 && this.resizable) {
		DOM.releaseCapture(getElement());

	    this.dragX = event.getClientX() - this.dragX;
	    this.dragY = event.getClientY() - this.dragY;
	    
	    this.dragMode = -1;
	    this.updateCursor(this.dragMode);
	    RootPanel.get().getElement().getStyle().setCursor(Cursor.AUTO);
	}
	else {
		super.endDragging(event);
	}
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:17,代码来源:WindowBox.java

示例6: update

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
@Override
public void update(ActionEvent e) {
  panel.clear();

  Project project = appContext.getRootProject();
  if (project != null && project.getAttributes().containsKey(GIT_CURRENT_HEAD_NAME)) {
    Label projectNameLabel = new Label(project.getName());
    projectNameLabel.ensureDebugId("statusBarProjectBranchRepositoryName");
    projectNameLabel.getElement().getStyle().setMarginLeft(5., Unit.PX);
    panel.add(projectNameLabel);

    SVGImage branchIcon = new SVGImage(resources.checkoutReference());
    branchIcon.getSvgElement().getStyle().setMarginLeft(5., Unit.PX);
    panel.add(branchIcon);

    Label headLabel = new Label(project.getAttribute(GIT_CURRENT_HEAD_NAME));
    headLabel.ensureDebugId("statusBarProjectBranchName");
    headLabel.setTitle(constant.branchesControlTitle());
    Style headLabelStyle = headLabel.getElement().getStyle();
    headLabelStyle.setCursor(Cursor.POINTER);
    headLabelStyle.setMarginLeft(5., Unit.PX);
    headLabel.addClickHandler(event -> branchPresenter.showBranches(project));
    panel.add(headLabel);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:StatusBarBranchPointer.java

示例7: createSpanElement

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private SpanElement createSpanElement(final Cursor cursor,
                                      final double left,
                                      final double width) {
    final SpanElement span = document.createSpanElement();
    span.setAttribute("title",
                      title);
    final Style style = span.getStyle();
    style.setCursor(cursor);
    style.setPosition(Position.ABSOLUTE);
    style.setBottom(0,
                    PX);
    style.setHeight(source.getOffsetHeight(),
                    PX);
    style.setTop(source.getOffsetTop(),
                 PX);
    style.setWidth(width,
                   PX);
    style.setLeft(left,
                  PX);
    return span;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:22,代码来源:ResizableMovableHeader.java

示例8: TextBoxWithPopupEditorFw

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
public TextBoxWithPopupEditorFw(FDesc fielddescriptor, WidgetRDesc wrDesc) {
    super(fielddescriptor);
    panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    textBox = new TextBox();
    updateWidth(wrDesc);
    panel.add(textBox);
    panel.add(showPopupLabel);
    initWidget(panel);

    showPopupLabel.getElement().getStyle().setCursor(Cursor.POINTER);
    showPopupLabel.getElement().getStyle().setTextDecoration(TextDecoration.UNDERLINE);
    showPopupLabel.getElement().getStyle().setMarginLeft(6, Unit.PX);
    showPopupLabel.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP);

    showPopupLabel.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            showPopup();
        }
    });
}
 
开发者ID:inepex,项目名称:ineform,代码行数:23,代码来源:TextBoxWithPopupEditorFw.java

示例9: setEnabled

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
@Override
public void setEnabled(boolean enabled) {
    this.enabled = enabled;

    if (usetextbox) {
        tb_datetime.setEnabled(enabled);
    }

    if (showstepbuttons) {
        if (enabled) {
            img_step_bck.getElement().getStyle().setOpacity(1);
            img_step_bck.getElement().getStyle().setCursor(Cursor.POINTER);
            img_step_fwd.getElement().getStyle().setOpacity(1);
            img_step_fwd.getElement().getStyle().setCursor(Cursor.POINTER);
        } else {
            img_step_bck.getElement().getStyle().setOpacity(0.3);
            img_step_bck.getElement().getStyle().setCursor(Cursor.DEFAULT);
            img_step_fwd.getElement().getStyle().setOpacity(0.3);
            img_step_fwd.getElement().getStyle().setCursor(Cursor.DEFAULT);
        }
    }

}
 
开发者ID:inepex,项目名称:ineform,代码行数:24,代码来源:AbstractField.java

示例10: styleControls

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private void styleControls() {  
  	linksPanel.getElement().getStyle().setPadding(10, Unit.PX);
  	linksPanel.setSize("275px", "389px");
  	linksPanel.addStyleName("tutorial-inner-gradient");
  	linksPanel.addStyleName("tutorial-gradient-overlay-middle");
  	
  	dontShowCheckbox.addStyleName("rdn-CheckBox");
  	dontShowCheckbox.getElement().getStyle().setFontSize(13, Unit.PX);

  	videoFrame.setSize("640px", "385px");
  	videoFrame.getElement().setPropertyInt("frameBorder", 0);
  	videoFrame.getElement().getStyle().setBackgroundColor("black");
  	
  	startVideoImage.setSize("640px", "385px");
  	startVideoImage.getElement().getStyle().setCursor(Cursor.POINTER);
  	
  	mainPanel.getElement().getStyle().setOverflow(Overflow.VISIBLE);
  	
  	setSize("928px", "398px");

addStyleName("tutorial-rounded-border");
addStyleName("tutorial-gradient-overlay-up");
  }
 
开发者ID:Rise-Vision,项目名称:rva,代码行数:24,代码来源:TutorialSliderWidget.java

示例11: DndLink

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
public DndLink(String text, String link, DomainObject representedDomainObject, Widget parent) {
		
		myLink = new Hyperlink(text, link);
		this.setWidget(myLink);
		
		//workaround default blue link text styling
		myLink.getElement().getFirstChildElement().getStyle().setColor("#475765");

		representedObjects = new ArrayList<DomainObject>(1);
		representedObjects.add(representedDomainObject);
//		this.parent = parent;
		// this.representedDomainObject = representedDomainObject;
		
		if(!draggable()) {
			this.getElement().getStyle().setCursor(Cursor.POINTER);
		}
	}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:18,代码来源:DndLink.java

示例12: createSpanElement

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
private SpanElement createSpanElement(String innerText, String title, String backgroundColor, Cursor cursor, double left){
    final SpanElement span = document.createSpanElement();
    span.setInnerText(innerText);
    span.setAttribute("title", title);
    final Style style = span.getStyle();
    style.setCursor(cursor);
    style.setPosition(Position.ABSOLUTE);
    style.setBottom(0, PX);
    style.setHeight(source.getOffsetHeight(), PX);
    style.setTop(source.getOffsetTop(), PX);
    style.setColor(FOREGROUND_COLOR);
    style.setWidth(RESIZE_HANDLE_WIDTH, PX);
    style.setLeft(left, PX);
    style.setBackgroundColor(backgroundColor);
    return span;
}
 
开发者ID:rkfg,项目名称:gwtutil,代码行数:17,代码来源:ResizableHeader.java

示例13: AbstractTreeNodeView

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
protected AbstractTreeNodeView(UIObject parentNode)
{
    addItemToParent(parentNode);
    nodeLabel.addStyleDependentName("classTreeNodeView");

    contents.add(clearButton);
    contents.add(nodeLabel);

    clearButton.getElement().getStyle().setCursor(Cursor.POINTER);
    clearButton.setVisible(false);
    clearButton.getElement().getStyle().setMarginLeft(5, Unit.PX);
    clearButton.getElement().getStyle().setMarginRight(5, Unit.PX);
    clearButton.setTitle("Reset field value (use implementation default value)");
    setWidget(contents);

    bind();
}
 
开发者ID:Doloops,项目名称:arondor-common-reflection,代码行数:18,代码来源:AbstractTreeNodeView.java

示例14: getResizerInformation

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
@Override
protected ResizerInformation getResizerInformation( int mx ) {
    boolean isPrimed = false;
    ResizerInformation resizerInfo = new ResizerInformation();
    for ( int iCol = 0; iCol < widget.headerRows[ 0 ].getChildCount(); iCol++ ) {
        TableCellElement tce = widget.headerRows[ 0 ].getChild( iCol ).<TableCellElement>cast();
        int cx = tce.getAbsoluteRight();
        if ( Math.abs( mx - cx ) <= 5 ) {
            isPrimed = true;
            resizerInfo.setResizePrimed( isPrimed );
            resizerInfo.setResizeColumn( widget.headerColumns.get( iCol ) );
            resizerInfo.setResizeColumnLeft( tce.getAbsoluteLeft() );
            break;
        }
    }
    if ( isPrimed ) {
        setCursorType( Cursor.COL_RESIZE );
    } else {
        setCursorType( Cursor.DEFAULT );
    }

    return resizerInfo;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:24,代码来源:TemplateDataHeaderWidget.java

示例15: Group

import com.google.gwt.dom.client.Style.Cursor; //导入依赖的package包/类
public Group(String name, int type, boolean editable) {
	super(name, false);
	iName = name;
	iType = type;
	iGroupEditable = editable;
	setStylePrimaryName("unitime-TinyLabel" + (iType == 1 ? "White" : ""));
	if (iEditable && !iGroupEditable)
		getElement().getStyle().setFontStyle(FontStyle.ITALIC);
	if (iEditable && iGroupEditable) {
		addClickHandler(iNewGroupDialog.getClickHandler());
		getElement().getStyle().setCursor(Cursor.POINTER);
	}
	iOperation = new Operation() {
		@Override
		public String getName() {
			return getElement().getString();
		}
		@Override
		public boolean hasSeparator() {
			return false;
		}

		@Override
		public boolean isApplicable() {
			return iEditable && iGroupEditable && iVisibleCourses == null;
		}

		@Override
		public void execute() {
			assignGroup(null, iName, iType);
		}
	};
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:34,代码来源:CurriculaCourses.java


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