org.eclipse.draw2d.Cursors Java Examples
The following examples show how to use
org.eclipse.draw2d.Cursors.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Annotation.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * 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); }
Example #2
Source File: CustomResizeHandle.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public CustomResizeHandle(GraphicalEditPart owner, int direction) { setOwner(owner); RelativeHandleLocator locator = new RelativeHandleLocator(owner.getFigure(), direction){ protected Rectangle getReferenceBox() { IFigure f = getReferenceFigure(); if (f instanceof HandleBounds){ Rectangle r = ((HandleBounds) f).getHandleBounds() ; return r; } return super.getReferenceBox(); } }; setLocator(locator); setCursor(Cursors.getDirectionalCursor(direction, owner.getFigure() .isMirrored())); cursorDirection = direction; }
Example #3
Source File: RowHandle.java From birt with Eclipse Public License 1.0 | 6 votes |
/** * 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 ); }
Example #4
Source File: ColumnDragHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Initializes the handle. Sets the {@link DragTracker}and DragCursor. */ protected void initialize( ) { setOpaque( true ); setBorder( new LineBorder( 1 ) ); setCursor( Cursors.SIZEWE ); }
Example #5
Source File: ERDiagramMoveHandle.java From ermaster-b with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected void initialize() { setOpaque(false); setBorder(new ERDiagramLineBorder()); setCursor(Cursors.SIZEALL); }
Example #6
Source File: SubprocessCollapseHandle.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates a new Compartment Collapse Handle * * @param owner */ public SubprocessCollapseHandle(IGraphicalEditPart owner) { setOwner(owner); zoomManager = ((DiagramRootEditPart) owner.getRoot()).getZoomManager(); setLocator(new CollapseHandleLocator()); setCursor(Cursors.HAND); plus = FiguresHelper.getDecoratorFigure(FiguresHelper.SUBPROCESS_DECORATOR_EXPAND) ; minus = FiguresHelper.getDecoratorFigure(FiguresHelper.SUBPROCESS_DECORATOR_COLLAPSE) ; setLayoutManager(new StackLayout()); zoomManager.addZoomListener(this) ; setSize(plus.getSize().scale(zoomManager.getZoom())); View view = owner.getNotationView(); if (view != null) { DrawerStyle style = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); if (style != null) { if(style.isCollapsed()){ add(plus) ; }else{ add(minus) ; } for(Object child : getChildren()){ if(child instanceof DecoratorSVGFigure){ final IGraphicalEditPart parentEditpart = (IGraphicalEditPart)getOwner().getParent(); ((DecoratorSVGFigure) child).setColor(ColorRegistry.getInstance().getColor((Integer) parentEditpart.getStructuralFeatureValue(NotationPackage.eINSTANCE.getLineStyle_LineColor())) ,ColorRegistry.getInstance().getColor((Integer) parentEditpart.getStructuralFeatureValue(NotationPackage.eINSTANCE.getFillStyle_FillColor()))); } } return; } } }
Example #7
Source File: CustomPoolResizeHandle.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
public CustomPoolResizeHandle(GraphicalEditPart owner, int direction) { setOwner(owner); setLocator(new RelativeHandleLocator(owner.getFigure(), direction)); setCursor(Cursors.getDirectionalCursor(direction, owner.getFigure() .isMirrored())); cursorDirection = direction; }
Example #8
Source File: CustomZoomTool.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected Cursor getDefaultCursor() { if (getCurrentViewer() instanceof GraphicalViewer) { if (getZoomMode() == ZOOM_IN_MODE) return zoom_in_cursor; else if (getZoomMode() == ZOOM_OUT_MODE) return zoom_out_cursor; else if (getZoomMode() == ZOOM_PAN_MODE) return zoom_pan_cursor; } return Cursors.NO; }
Example #9
Source File: RowDragTracker.java From birt with Eclipse Public License 1.0 | 5 votes |
@Override protected Cursor getDefaultCursor( ) { if (isCloneActive()) { return Cursors.SIZENS; } return super.getDefaultCursor( ); }
Example #10
Source File: ColumnDragTracker.java From birt with Eclipse Public License 1.0 | 5 votes |
@Override protected Cursor getDefaultCursor( ) { if (isCloneActive()) { return Cursors.SIZEWE; } return super.getDefaultCursor( ); }
Example #11
Source File: CornerHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * 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 ); }
Example #12
Source File: ReportMoveHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Initializes the handle. Sets the {@link DragTracker} and DragCursor. */ protected void initialize( ) { setOpaque( false ); setBorder( new SelectionBorder( 1 ) ); setCursor( Cursors.SIZEALL ); }
Example #13
Source File: ColumnHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * 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 ); }
Example #14
Source File: TableHFHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * 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( ); }
Example #15
Source File: RowDragHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * Initializes the handle. Sets the {@link DragTracker}and DragCursor. */ protected void initialize( ) { setOpaque( true ); setBorder( new LineBorder( 1 ) ); setCursor( Cursors.SIZENS ); }
Example #16
Source File: ScaledSliderFigure.java From nebula with Eclipse Public License 2.0 | 5 votes |
public Thumb() { super(); setOutline(true); setFill(true); setCursor(Cursors.HAND); setForegroundColor(GRAY_COLOR); setLineWidth(1); ThumbDragger thumbDragger = new ThumbDragger(); addMouseMotionListener(thumbDragger); addMouseListener(thumbDragger); }
Example #17
Source File: TableCellDragHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * @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; }
Example #18
Source File: CrosstabColumnDragTracker.java From birt with Eclipse Public License 1.0 | 5 votes |
@Override protected Cursor getDefaultCursor( ) { if (isCloneActive()) { return Cursors.SIZEWE; } return super.getDefaultCursor( ); }
Example #19
Source File: CrosstabRowDragTracker.java From birt with Eclipse Public License 1.0 | 5 votes |
@Override protected Cursor getDefaultCursor( ) { if (isCloneActive()) { return Cursors.SIZENS; } return super.getDefaultCursor( ); }
Example #20
Source File: CrosstavCellDragHandle.java From birt with Eclipse Public License 1.0 | 5 votes |
/** * @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; }
Example #21
Source File: ERDiagramMoveHandle.java From ermasterr with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected void initialize() { setOpaque(false); setBorder(new ERDiagramLineBorder()); setCursor(Cursors.SIZEALL); }
Example #22
Source File: KnobFigure.java From nebula with Eclipse Public License 2.0 | 5 votes |
@Override public void setEnabled(boolean value) { super.setEnabled(value); if(value) thumb.setCursor(Cursors.HAND); //the disabled cursor should be controlled by widget controller. repaint(); }
Example #23
Source File: EditorGuideDragTracker.java From birt with Eclipse Public License 1.0 | 4 votes |
protected Cursor calculateCursor() { if (isInState(STATE_INVALID)) return Cursors.NO; return getCurrentCursor(); }
Example #24
Source File: ERDiagramMoveHandle.java From erflute with Apache License 2.0 | 4 votes |
@Override protected void initialize() { setOpaque(false); setBorder(new ERDiagramLineBorder()); setCursor(Cursors.SIZEALL); }
Example #25
Source File: Annotation.java From nebula with Eclipse Public License 2.0 | 4 votes |
public Pointer() { setCursor(Cursors.CROSS); AnnotationDragger dragger = new AnnotationDragger(true, true); addMouseMotionListener(dragger); addMouseListener(dragger); }
Example #26
Source File: KnobFigure.java From nebula with Eclipse Public License 2.0 | 4 votes |
public Thumb() { setCursor(Cursors.HAND); ThumbDragger thumbDragger = new ThumbDragger(); addMouseMotionListener(thumbDragger); addMouseListener(thumbDragger); }
Example #27
Source File: CrosstabColumnDragTracker.java From birt with Eclipse Public License 1.0 | 3 votes |
/** * Constructor * * @param sourceEditPart * @param start * @param end */ public CrosstabColumnDragTracker( EditPart sourceEditPart, int start, int end ) { super( sourceEditPart, start, end ); setDisabledCursor( Cursors.SIZEWE ); }
Example #28
Source File: ColumnDragTracker.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * Creates new ColumnDragtrcker, for resize the table column width * * @param sourceEditPart * @param start * @param end */ public ColumnDragTracker( EditPart sourceEditPart, int start, int end ) { super( sourceEditPart, start, end ); setDisabledCursor( Cursors.SIZEWE ); }
Example #29
Source File: CrosstabRowDragTracker.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * Constructor * * @param sourceEditPart * @param start * @param end */ public CrosstabRowDragTracker( EditPart sourceEditPart, int start, int end ) { super( sourceEditPart, start, end ); setDisabledCursor( Cursors.SIZENS ); }
Example #30
Source File: RowDragTracker.java From birt with Eclipse Public License 1.0 | 2 votes |
/** * Constructor * @param sourceEditPart * @param start * @param end */ public RowDragTracker( EditPart sourceEditPart, int start, int end ) { super( sourceEditPart, start, end ); setDisabledCursor( Cursors.SIZENS ); }