Java 类org.eclipse.draw2d.Cursors 实例源码

项目:DarwinSPL    文件:DwThemedNonResizableEditPolicy.java   
/**
 * Create selection handles in the style as predefined in DeltaEcore
 * @see DEGraphicalEditorTheme
 */
@Override
protected List<Object> createSelectionHandles() {
    List<Object> list = new ArrayList<Object>();

    MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
    moveHandle.setDragTracker(getDragTracker());        

    if (isDragAllowed()) {
        moveHandle.setCursor(Cursors.SIZEALL);
    } else {
        moveHandle.setCursor(SharedCursors.ARROW);
    }

    // set line style to meet the predefined theme
    DEGraphicalEditorTheme theme = DEGraphicalEditor.getTheme();
    LineBorder border = new LineBorder();
    border.setColor(theme.getSelectionSecondaryColor());
    border.setWidth(theme.getLineWidth());
    moveHandle.setBorder(border);

    list.add(moveHandle);

    return list;
}
项目:subclipse    文件:GraphEditPart.java   
private PolylineConnection makeConnection(IFigure contents, IFigure source, NodeFigure target, Color color) {
    PolylineConnection c = new PolylineConnection();
    ConnectionAnchor targetAnchor = new ChopboxAnchor(target);
    c.setTargetAnchor(targetAnchor);
    c.setSourceAnchor(new ChopboxAnchor(source));
    PolygonDecoration decoration = new PolygonDecoration();
    decoration.setTemplate(PolygonDecoration.TRIANGLE_TIP);
    c.setTargetDecoration(decoration);
    c.setForegroundColor(color);
    ConnectionMouseListener listener = new ConnectionMouseListener(c);
    c.addMouseMotionListener(listener);
    c.addMouseListener(listener);
    c.setCursor(Cursors.HAND);
    contents.add(c);
    connections.add(c);
    return c;
}
项目:scouter    文件:Annotation.java   
/**Construct a free annotation.
 * @param xAxis the xAxis of the annotation.
 * @param yAxis the yAxis of the annotation.
 * @param name the name of the annotation.
 */
public Annotation(String name, Axis xAxis, Axis yAxis) {
    this.xAxis = xAxis;
    this.yAxis = yAxis;
    this.name = name;
    trace = null;           
    infoLabel = new Label();
    infoLabel.setOpaque(false);
    infoLabel.setCursor(Cursors.SIZEALL);       
    add(infoLabel);
    InfoLabelDragger infoLabelDragger = new InfoLabelDragger();
    infoLabel.addMouseMotionListener(infoLabelDragger);
    infoLabel.addMouseListener(infoLabelDragger);       
    pointer = new Pointer();
    add(pointer);
    updateToDefaultPosition();  
    xAxis.addListener(this);
    yAxis.addListener(this);
}
项目:birt    文件:RowHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    LineBorder bd = new LineBorder( 1 );
    bd.setColor( ReportColorConstants.HandleBorderColor );
    setBorder( bd );

    String tp = getTooltipText( );
    if ( tp != null )
    {
        Label tooltip = new Label( tp );
        tooltip.setBorder( new MarginBorder( 0, 2, 0, 2 ) );
        setToolTip( tooltip );
    }

    setCursor( Cursors.ARROW );
}
项目:subclipse    文件:NodeFigure.java   
public NodeFigure(Node node, Color bgcolor, Color fgcolor) {
    this.node = node;
    this.bgcolor = bgcolor;
    setLayoutManager(new BorderLayout());
    setBackgroundColor(bgcolor);
    setForegroundColor(fgcolor);
    setOpaque(true);

    setToolTip(new NodeTooltipFigure(node));
    setCursor(Cursors.HAND);
}
项目:ermasterr    文件:ERDiagramMoveHandle.java   
/**
 * {@inheritDoc}
 */
@Override
protected void initialize() {
    setOpaque(false);
    setBorder(new ERDiagramLineBorder());
    setCursor(Cursors.SIZEALL);
}
项目:ermaster-k    文件:ERDiagramMoveHandle.java   
/**
 * {@inheritDoc}
 */
@Override
protected void initialize() {
    setOpaque(false);
    setBorder(new ERDiagramLineBorder());
    setCursor(Cursors.SIZEALL);
}
项目:scouter    文件:XYGraphMediaFactory.java   
public static Cursor getCursor(CURSOR_TYPE cursorType){
    switch (cursorType) {
    case GRABBING:
        if(CURSOR_GRABBING == null){

            CURSOR_GRABBING = new Cursor(Display.getDefault(), 
                    getInstance().getImage("images/Grabbing.png").getImageData(), 8,8);     
        }
        return CURSOR_GRABBING;

    default:
        return Cursors.HAND;

    }
}
项目:PDFReporter-Studio    文件:CalloutElementResizableEditPolicy.java   
@Override
protected void createResizeHandle(List handles, int direction) {
    if ((getResizeDirections() & direction) == direction) {
        SothEastRectangleHandles handle = new SothEastRectangleHandles((GraphicalEditPart) getHost(), direction);
        handle.setDragTracker(getResizeTracker(direction));
        handle.setCursor(Cursors.getDirectionalCursor(direction, getHostFigure().isMirrored()));
        handles.add(handle);
    } else {
        // display 'resize' handle to allow dragging or indicate selection
        // only
        createDragHandle(handles, direction);
    }
}
项目:PDFReporter-Studio    文件:ElementResizableEditPolicy.java   
protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
        // display 'move' handle to allow dragging
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getDragTracker(), Cursors.SIZEALL);
    } else {
        // display 'move' handle only to indicate selection
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getSelectTracker(), SharedCursors.ARROW);
    }
}
项目:PDFReporter-Studio    文件:ElementResizableEditPolicy.java   
protected void createResizeHandle(List handles, int direction) {
    if ((getResizeDirections() & direction) == direction) {
        ColoredSquareHandles handle = new ColoredSquareHandles((GraphicalEditPart) getHost(), direction);
        handle.setDragTracker(getResizeTracker(direction));
        handle.setCursor(Cursors.getDirectionalCursor(direction, getHostFigure().isMirrored()));
        handles.add(handle);
    } else {
        // display 'resize' handle to allow dragging or indicate selection
        // only
        createDragHandle(handles, direction);
    }
}
项目:PDFReporter-Studio    文件:JDGuideEditPart.java   
public DragTracker getDragTracker(Request request) {
    return new DragEditPartsTracker(this) {
        protected Cursor calculateCursor() {
            if (isInState(STATE_INVALID))
                return Cursors.NO;
            return getCurrentCursor();
        }

        protected boolean isMove() {
            return true;
        }
    };
}
项目:OpenSPIFe    文件:ZoomSweepTool.java   
@Override
public void setViewer(EditPartViewer viewer) {
    if (viewer == getCurrentViewer())
        return;
    super.setViewer(viewer);
    if (viewer instanceof GraphicalViewer)
        setDefaultCursor(Cursors.SIZEWE);
    else
        setDefaultCursor(Cursors.NO);
}
项目:OpenSPIFe    文件:SplitEditPart.java   
@Override
protected void initialize() {
    switch(((SplitEditPart)getOwner()).getCastedFigure().getOrientation()) {
    case SplitConstants.HORIZONTAL_SPLIT:
        setCursor(Cursors.SIZEWE);
        break;
    case SplitConstants.VERTICAL_SPLIT:
        setCursor(Cursors.SIZENS);
        break;
    }
}
项目:ermaster-nhit    文件:ERDiagramMoveHandle.java   
/**
 * {@inheritDoc}
 */
@Override
protected void initialize() {
    setOpaque(false);
    setBorder(new ERDiagramLineBorder());
    setCursor(Cursors.SIZEALL);
}
项目:gef-gwt    文件:ConnectionHandle.java   
/**
 * Creates a new handle with the given fixed setting. If the handle is
 * fixed, it cannot be dragged.
 * 
 * @param fixed
 *            <code>true</code> if the handle cannot be dragged.
 */
public ConnectionHandle(boolean fixed) {
    setFixed(fixed);
    if (fixed)
        setCursor(Cursors.NO);
    else
        setCursor(Cursors.CROSS);
}
项目:gef-gwt    文件:ConnectionHandle.java   
/**
 * Sets whether the handle is fixed and cannot be moved
 * 
 * @param fixed
 *            <code>true</code> if the handle should be unmovable
 */
public void setFixed(boolean fixed) {
    this.fixed = fixed;
    if (fixed)
        setCursor(Cursors.NO);
    else
        setCursor(Cursors.CROSS);
}
项目:gef-gwt    文件:NonResizableHandle.java   
/**
 * Initializes the handle. Sets the {@link org.eclipse.gef.DragTracker} and
 * DragCursor.
 */
protected void initialize() {
    setOpaque(false);
    border = new CornerTriangleBorder(false);
    setBorder(border);
    setCursor(Cursors.SIZEALL);
    setDragTracker(new DragEditPartsTracker(getOwner()));
}
项目:gef-gwt    文件:NonResizableEditPolicy.java   
/**
 * Creates a 'move' handle, which uses a {@link DragEditPartsTracker} in
 * case {@link #isDragAllowed()} returns true, and a
 * {@link SelectEditPartTracker} otherwise.
 * 
 * @param handles
 *            The list of handles to add the move handle to.
 * @since 3.7
 */
protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
        // display 'move' handle to allow dragging
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getDragTracker(), Cursors.SIZEALL);
    } else {
        // display 'move' handle only to indicate selection
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getSelectTracker(), SharedCursors.ARROW);
    }
}
项目:gef-gwt    文件:GuideEditPart.java   
public DragTracker getDragTracker(Request request) {
    return new DragEditPartsTracker(this) {
        protected Cursor calculateCursor() {
            if (isInState(STATE_INVALID))
                return Cursors.NO;
            return getCurrentCursor();
        }

        protected boolean isMove() {
            return true;
        }
    };
}
项目:birt    文件:CrosstavCellDragHandle.java   
/**
 * @param owner
 * @param direction
 * @param start
 * @param end
 */
public CrosstavCellDragHandle( CrosstabCellEditPart owner, int direction,int start,
        int end)
{
    setOwner(owner);
    setLocator(new CellDragoicator(owner.getFigure(), direction));
    setCursor(Cursors.getDirectionalCursor(direction, owner.getFigure().isMirrored()));
    cursorDirection = direction;
    setOpaque( false );

    this.start = start;
    this.end = end;
}
项目:birt    文件:CrosstabRowDragTracker.java   
@Override
protected Cursor getDefaultCursor( )
{
    if (isCloneActive())
    {
        return Cursors.SIZENS;
    }
    return super.getDefaultCursor( );
}
项目:birt    文件:CrosstabColumnDragTracker.java   
@Override
protected Cursor getDefaultCursor( )
{
    if (isCloneActive())
    {
        return Cursors.SIZEWE;
    }
    return super.getDefaultCursor( );
}
项目:birt    文件:TableCellDragHandle.java   
/**
 * @param owner
 * @param direction
 * @param start
 * @param end
 */
public TableCellDragHandle( TableCellEditPart owner, int direction,int start,
        int end)
{
    setOwner(owner);
    setLocator(new CellDragoicator(owner.getFigure(), direction));
    setCursor(Cursors.getDirectionalCursor(direction, owner.getFigure().isMirrored()));
    cursorDirection = direction;
    setOpaque( false );

    this.start = start;
    this.end = end;
}
项目:birt    文件:ColumnDragHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    setBorder( new LineBorder( 1 ) );
    setCursor( Cursors.SIZEWE );
}
项目:birt    文件:RowDragHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    setBorder( new LineBorder( 1 ) );
    setCursor( Cursors.SIZENS );
}
项目:birt    文件:TableHFHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    //should draw the fill rectangle
    setOpaque( true );
    //draw the border line width is 1
    LineBorder bd = new LineBorder( 1 );
    bd.setColor( ReportColorConstants.HandleBorderColor );
    setBorder( bd );

    //set the default cursor, may not be a SIZEALL cursor()
    setCursor( Cursors.ARROW );

    initChildrenHandle( );
}
项目:birt    文件:ColumnHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    LineBorder bd = new LineBorder( 1 );
    bd.setColor( ReportColorConstants.HandleBorderColor );
    setBorder( bd );
    setCursor( Cursors.ARROW );
}
项目:birt    文件:ReportMoveHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker} and DragCursor.
 */
protected void initialize( )
{
    setOpaque( false );
    setBorder( new SelectionBorder( 1 ) );
    setCursor( Cursors.SIZEALL );
}
项目:birt    文件:CornerHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    LineBorder bd = new LineBorder( 1 );
    bd.setColor( ReportColorConstants.HandleBorderColor );
    setBorder( bd );
    setCursor( Cursors.ARROW );
}
项目:birt    文件:ColumnDragTracker.java   
@Override
protected Cursor getDefaultCursor( )
{
    if (isCloneActive())
    {
        return Cursors.SIZEWE;
    }
    return super.getDefaultCursor( );
}
项目:birt    文件:RowDragTracker.java   
@Override
protected Cursor getDefaultCursor( )
{
    if (isCloneActive())
    {
        return Cursors.SIZENS;
    }
    return super.getDefaultCursor( );
}
项目:wt-studio    文件:NodeMoveHandle.java   
/**
 * {@inheritDoc}
 */
@Override
protected void initialize() {
    setOpaque(false);
    setBorder(new NodeLineBorder());
    setCursor(Cursors.SIZEALL);
}
项目:relations    文件:ItemFigure.java   
/**
 * Sets this figure's clickable state. If the figure is clickable, it can be
 * moved to the center.
 *
 * @param inClickable
 *            boolean
 */
public void setClickable(final boolean inClickable) {
    if (inClickable) {
        isClickable = true;
        label.setForegroundColor(ACTIVE_COLOR);
        underline.setVisible(true);
        defaultCursor = getCursor();
        setCursor(Cursors.HAND);
    } else {
        isClickable = false;
        label.setForegroundColor(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
        underline.setVisible(false);
        setCursor(defaultCursor);
    }
}
项目:NEXCORE-UML-Modeler    文件:NoteFigure.java   
/**
 * NoteFigure
 */
public NoteFigure() {
    super();
    textFlow = createTextFlow();
    setCursor(Cursors.IBEAM);
}
项目:scouter    文件:Annotation.java   
public Pointer() {
    setCursor(Cursors.CROSS);
    PointerDragger dragger = new PointerDragger();
    addMouseMotionListener(dragger);
    addMouseListener(dragger);
}
项目:PDFReporter-Studio    文件:BandResizeHandle.java   
/**
 * Initializes the handle.  Sets the {@link DragTracker} and
 * DragCursor.
 */
protected void initialize() {
    setOpaque(false);
    setCursor(Cursors.SIZES);
}
项目:erflute    文件:ERDiagramMoveHandle.java   
@Override
protected void initialize() {
    setOpaque(false);
    setBorder(new ERDiagramLineBorder());
    setCursor(Cursors.SIZEALL);
}
项目:OpenSPIFe    文件:ZoomSweepTool.java   
public ZoomSweepTool() {
    super();
    setDefaultCursor(Cursors.SIZEWE); 
    setUnloadWhenFinished(false);
}
项目:gef-gwt    文件:ConnectionHandle.java   
/**
 * Creates a new ConnectionHandle.
 */
public ConnectionHandle() {
    setCursor(Cursors.CROSS);
}