Examples of SapphireKeySequence


Examples of org.eclipse.sapphire.ui.def.SapphireKeySequence

    {
      for( SapphireAction action : groupOfActions.getActions() )
      {
        if( action.hasActiveHandlers() && ( ! onlyPropagatedKeyBindings || action.getKeyBindingBehavior() == KeyBindingBehavior.PROPAGATED ) )
        {
          final SapphireKeySequence keySequence = action.getKeyBinding();
 
          if( keySequence != null )
          {
            int expectedStateMask = 0;
 
            for( SapphireKeySequence.Modifier modifier : keySequence.getModifiers() )
            {
            if( modifier == SapphireKeySequence.Modifier.SHIFT )
            {
                expectedStateMask = expectedStateMask | SWT.SHIFT;
            }
            else if( modifier == SapphireKeySequence.Modifier.ALT )
            {
                expectedStateMask = expectedStateMask | SWT.ALT;
            }
            else if( modifier == SapphireKeySequence.Modifier.CONTROL )
            {
                expectedStateMask = expectedStateMask | SWT.CONTROL;
            }
            }
 
            if( event.stateMask == expectedStateMask && event.keyCode == keySequence.getKeyCode() )
            {
              final List<SapphireActionHandler> handlers = action.getActiveHandlers();
 
              if( handlers.size() == 1 )
              {
View Full Code Here

Examples of org.eclipse.sapphire.ui.def.SapphireKeySequence

    {
        for( SapphireAction action : groupOfActions.getActions() )
        {
            if( action.hasActiveHandlers() && ( ! onlyPropagatedKeyBindings || action.getKeyBindingBehavior() == KeyBindingBehavior.PROPAGATED ) )
            {
                final SapphireKeySequence keySequence = action.getKeyBinding();
               
                if( keySequence != null )
                {
                    int expectedStateMask = 0;
                   
                    for( SapphireKeySequence.Modifier modifier : keySequence.getModifiers() )
                    {
                        if( modifier == SapphireKeySequence.Modifier.SHIFT )
                        {
                            expectedStateMask = expectedStateMask | SWT.SHIFT;
                        }
                        else if( modifier == SapphireKeySequence.Modifier.ALT )
                        {
                            expectedStateMask = expectedStateMask | SWT.ALT;
                        }
                        else if( modifier == SapphireKeySequence.Modifier.CONTROL )
                        {
                            expectedStateMask = expectedStateMask | SWT.CONTROL;
                        }
                    }
                   
                    if( event.stateMask == expectedStateMask && event.keyCode == keySequence.getKeyCode() )
                    {
                        final List<SapphireActionHandler> handlers = action.getEnabledHandlers();
                       
                        if( handlers.size() == 1 )
                        {
View Full Code Here

Examples of org.eclipse.sapphire.ui.def.SapphireKeySequence

    }

    @Override
    public SapphireKeySequence convert( final String string )
    {
        SapphireKeySequence result = null;
       
        try
        {
            return new SapphireKeySequence( string );
        }
        catch( IllegalArgumentException e )
        {
            // Intentionally ignored.
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.