Package org.jampa.gui.actions

Examples of org.jampa.gui.actions.SetVolumeAction


    scVolumeSlider.setMaximum(100);
   
    scVolumeSlider.addMouseMoveListener(new MouseMoveListener() {
      public void mouseMove(MouseEvent e) {
        if (_boVolumeSliderMove) {
          new SetVolumeAction(scVolumeSlider.getSelection()).run();
        }
        volumeLabel.setText(Integer.toString(scVolumeSlider.getSelection()) + "%"); //$NON-NLS-1$
      }
    });
   
    scVolumeSlider.addMouseListener(new MouseAdapter() {
      public void mouseDown(MouseEvent e) {
        _boVolumeSliderMove = true;
      }
      public void mouseUp(MouseEvent e) {
        _boVolumeSliderMove = false;
        new SetVolumeAction(scVolumeSlider.getSelection()).run();
      }
    });
   
    volumeLabel = new Label(container, SWT.NONE);
    volumeLabel.setText("100%"); //$NON-NLS-1$
View Full Code Here


    });
   
    scVolumeSlider.addMouseMoveListener(new MouseMoveListener() {
      public void mouseMove(MouseEvent e) {
        if (_boVolumeSliderMove) {
          new SetVolumeAction(scVolumeSlider.getSelection()).run();
        }
        laVolumeLabel.setText(Integer.toString(scVolumeSlider.getSelection()) + "%"); //$NON-NLS-1$
      }
    });
   
    scVolumeSlider.addMouseListener(new MouseAdapter() {
      public void mouseDown(MouseEvent e) {
        _boVolumeSliderMove = true;
      }
      public void mouseUp(MouseEvent e) {
        _boVolumeSliderMove = false;
        new SetVolumeAction(scVolumeSlider.getSelection()).run();
      }
    });   
   
    btnVolumeDown.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(scVolumeSlider.getSelection() - 10).run();       
      }
    });
   
    btnVolumeUp.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(scVolumeSlider.getSelection() + 10).run();     
      }
    });
   
    btnVolumeMute.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
View Full Code Here

    MenuItem volumeDownItem = new MenuItem(volumeItemMenu, SWT.PUSH);
    volumeDownItem.setText(Messages.getString("TrayController.VolumeDown")); //$NON-NLS-1$
    volumeDownItem.setImage(_volumeDownImage);
    volumeDownItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) - 10).run();
      }
    });
   
    MenuItem volumeUpItem = new MenuItem(volumeItemMenu, SWT.PUSH);
    volumeUpItem.setText(Messages.getString("TrayController.VolumeUp")); //$NON-NLS-1$
    volumeUpItem.setImage(_volumeUpImage);
    volumeUpItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) + 10).run();
      }
    });
   
    MenuItem volumeMuteItem = new MenuItem(volumeItemMenu, SWT.PUSH);
    volumeMuteItem.setText(Messages.getString("TrayController.VolumeMute")); //$NON-NLS-1$
    volumeMuteItem.setImage(_volumeMuteImage);
    volumeMuteItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new VolumeMuteAction().run();
      }
    });
   
    new MenuItem(volumeItemMenu, SWT.SEPARATOR);
   
    MenuItem volume100Item = new MenuItem(volumeItemMenu, SWT.PUSH);
    volume100Item.setText(Messages.getString("TrayController.Volume100")); //$NON-NLS-1$
    volume100Item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(100).run();
      }
    });
   
    MenuItem volume75Item = new MenuItem(volumeItemMenu, SWT.PUSH);
    volume75Item.setText(Messages.getString("TrayController.Volume75")); //$NON-NLS-1$
    volume75Item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(75).run();
      }
    });
   
    MenuItem volume50Item = new MenuItem(volumeItemMenu, SWT.PUSH);
    volume50Item.setText(Messages.getString("TrayController.Volume50")); //$NON-NLS-1$
    volume50Item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(50).run();
      }
    });
   
    MenuItem volume25Item = new MenuItem(volumeItemMenu, SWT.PUSH);
    volume25Item.setText(Messages.getString("TrayController.Volume25")); //$NON-NLS-1$
    volume25Item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        new SetVolumeAction(25).run();
      }
    });
   
    new MenuItem(trayMenu, SWT.SEPARATOR);
   
View Full Code Here

    volumeMuteAction.setImageDescriptor(ToolbarImageFactory.getInstance().getImageDescriptor("volumemute", _toolbarSize));
    volumeMuteAction.setEnabled(false);
   
    volumeUpAction = new Action(Messages.getString("PlayerView.VolumeUp")) {
      public void run() {
        new SetVolumeAction(volumeBar.getSelection() + 10).run();
      }
    };
    volumeUpAction.setImageDescriptor(ToolbarImageFactory.getInstance().getImageDescriptor("volumeup", _toolbarSize));
   
    volumeDownAction = new Action(Messages.getString("PlayerView.VolumeDown")) {
      public void run() {
        new SetVolumeAction(volumeBar.getSelection() - 10).run();
      }
    };
    volumeDownAction.setImageDescriptor(ToolbarImageFactory.getInstance().getImageDescriptor("volumedown", _toolbarSize));
   
    /**
 
View Full Code Here

   * Actions menu
   */
  private void buildActionsAction(final IWorkbenchWindow window, IHandlerService handlerService) {
    volumeDownAction = new Action(Messages.getString("Menu.Actions.VolumeDown"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) - 10).run();
      }
    };
    volumeDownAction.setImageDescriptor(Activator.getImageDescriptor("/icons/volumedown_16.png"));
    volumeDownAction.setActionDefinitionId("Jampa.menuVolumeDown");
    handlerService.activateHandler("Jampa.menuVolumeDown", new ActionHandler(volumeDownAction));
   
    volumeUpAction = new Action(Messages.getString("Menu.Actions.VolumeUp"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAYBACK_VOLUME) + 10).run();
      }
    };
    volumeUpAction.setImageDescriptor(Activator.getImageDescriptor("/icons/volumeup_16.png"));
    volumeUpAction.setActionDefinitionId("Jampa.menuVolumeUp");
    handlerService.activateHandler("Jampa.menuVolumeUp", new ActionHandler(volumeUpAction));
   
    volumeMuteAction = new Action(Messages.getString("Menu.Actions.VolumeMute"), SWT.NONE) {
      public void run() {
        new VolumeMuteAction().run();
      }
    };
    volumeMuteAction.setImageDescriptor(Activator.getImageDescriptor("/icons/volumemute_16.png"));
    volumeMuteAction.setActionDefinitionId("Jampa.menuVolumeMute");
    handlerService.activateHandler("Jampa.menuVolumeMute", new ActionHandler(volumeMuteAction));
    volumeMuteAction.setEnabled(false);
   
    volume100Action = new Action(Messages.getString("Menu.Actions.Volume100"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(100).run();
      }
    };
    volume100Action.setActionDefinitionId("Jampa.menuVolume100");
    handlerService.activateHandler("Jampa.menuVolume100", new ActionHandler(volume100Action));
   
    volume75Action = new Action(Messages.getString("Menu.Actions.Volume75"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(75).run()
      }
    };
    volume75Action.setActionDefinitionId("Jampa.menuVolume75");
    handlerService.activateHandler("Jampa.menuVolume75", new ActionHandler(volume75Action));
   
    volume50Action = new Action(Messages.getString("Menu.Actions.Volume50"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(50).run();
      }
    };
    volume50Action.setActionDefinitionId("Jampa.menuVolume50");
    handlerService.activateHandler("Jampa.menuVolume50", new ActionHandler(volume50Action));
   
    volume25Action = new Action(Messages.getString("Menu.Actions.Volume25"), SWT.NONE) {
      public void run() {
        new SetVolumeAction(25).run();
      }
    };
    volume25Action.setActionDefinitionId("Jampa.menuVolume25");
    handlerService.activateHandler("Jampa.menuVolume25", new ActionHandler(volume25Action));
   
View Full Code Here

TOP

Related Classes of org.jampa.gui.actions.SetVolumeAction

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.