Package nl.lxtreme.ols.api.data

Examples of nl.lxtreme.ols.api.data.Cursor


   * @param aPoint
   *          the current mouse location, cannot be <code>null</code>.
   */
  private void addCursorActions( final JPopupMenu aMenu, final Cursor aHoveredCursor, final Point aPoint )
  {
    Cursor cursor = aHoveredCursor;
    if ( cursor != null )
    {
      // Hovering above existing cursor, show remove menu...
      aMenu.add( new EditCursorPropertiesAction( this.controller, cursor ) );

View Full Code Here


  @Override
  public Cursor clone()
  {
    try
    {
      final Cursor result = ( Cursor )super.clone();
      if ( isDefined() )
      {
        result.setTimestamp( this.timestamp.longValue() );
      }
      if ( hasLabel() )
      {
        result.setLabel( new String( this.label ) );
      }
      result.setColor( this.color );
      return result;
    }
    catch ( CloneNotSupportedException exception )
    {
      throw new RuntimeException( "Internal error: Object#clone() not supported?!" );
View Full Code Here

      final Point point = event.getPoint();

      final SignalDiagramModel model = getModel();
      if ( model.isCursorMode() )
      {
        final Cursor hoveredCursor = findCursor( point );
        if ( hoveredCursor != null )
        {
          setMouseCursor( aEvent, CURSOR_MOVE_CURSOR );
          aEvent.consume();
        }
View Full Code Here

      MouseEvent event = convertEvent( aEvent );
      Point point = event.getPoint();

      if ( getModel().isCursorMode() )
      {
        final Cursor hoveredCursor = findCursor( point );
        if ( hoveredCursor != null )
        {
          editCursorProperties( hoveredCursor );
          // Consume the event to stop further processing...
          aEvent.consume();
View Full Code Here

    if ( !handlePopupTrigger( point, aEvent ) )
    {
      if ( getModel().isCursorMode() )
      {
        Cursor hoveredCursor = findCursor( point );
        if ( hoveredCursor != null )
        {
          this.movingCursor = hoveredCursor.getIndex();
          setMouseCursor( aEvent, SignalView.CURSOR_MOVE_CURSOR );
        }
        else
        {
          this.movingCursor = -1;
View Full Code Here

    if ( ( aCursorIdx < 0 ) || ( aCursorIdx > cursors.length ) )
    {
      throw new IllegalArgumentException( "Invalid cursor index!" );
    }

    final Cursor cursor = cursors[aCursorIdx];
    if ( !cursor.isDefined() )
    {
      // Nothing to do; the cursor is not defined...
      return;
    }

    final Cursor oldCursor = cursor.clone();

    cursor.clear();

    ICursorChangeListener[] listeners = this.eventListeners.getListeners( ICursorChangeListener.class );
    for ( ICursorChangeListener listener : listeners )
View Full Code Here

    if ( ( aCursorIdx < 0 ) || ( aCursorIdx > cursors.length ) )
    {
      throw new IllegalArgumentException( "Invalid cursor index!" );
    }

    final Cursor cursor = cursors[aCursorIdx];
    final Cursor oldCursor = cursor.clone();

    // Update the time stamp of the cursor...
    cursor.setTimestamp( aTimestamp );

    fireCursorChangeEvent( ICursorChangeListener.PROPERTY_TIMESTAMP, oldCursor, cursor );
View Full Code Here

    if ( ( aCursorIdx < 0 ) || ( aCursorIdx > cursors.length ) )
    {
      throw new IllegalArgumentException( "Invalid cursor index!" );
    }

    final Cursor cursor = cursors[aCursorIdx];
    final Cursor oldCursor = cursor.clone();

    // Update the color of the cursor...
    cursor.setColor( aColor );

    fireCursorChangeEvent( ICursorChangeListener.PROPERTY_COLOR, oldCursor, cursor );
View Full Code Here

    if ( ( aCursorIdx < 0 ) || ( aCursorIdx > cursors.length ) )
    {
      throw new IllegalArgumentException( "Invalid cursor index!" );
    }

    final Cursor cursor = cursors[aCursorIdx];
    final Cursor oldCursor = cursor.clone();

    // Update the label of the cursor...
    cursor.setLabel( aLabel );

    fireCursorChangeEvent( ICursorChangeListener.PROPERTY_LABEL, oldCursor, cursor );
View Full Code Here

TOP

Related Classes of nl.lxtreme.ols.api.data.Cursor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.