Package javax.swing

Examples of javax.swing.JCheckBoxMenuItem.addActionListener()


   
    public void addChatMenus(JMenu menu ,final ChatSplitPane chatPane)
    {
      JCheckBoxMenuItem item = new JCheckBoxMenuItem(
        I18N.gettext("windowsutils.Set_Always_On_Top"));
    item.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        if(((JCheckBoxMenuItem)e.getSource()).isSelected())
        { 
View Full Code Here


    menu.add(item);
    if(supportsAlpha())
    {
      item = new JCheckBoxMenuItem(
          I18N.gettext("windowsutils.Make_transparent"));
      item.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent e)
        {
          if(((JCheckBoxMenuItem)e.getSource()).isSelected())
          { 
View Full Code Here

    file.add(exit);
   
    JMenu view = new JMenu("View");
   
    JMenuItem sampleRate = new JCheckBoxMenuItem("Sample rate");
    sampleRate.addActionListener(new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent event) {
        showSps(((JCheckBoxMenuItem) event.getSource()).getState());
      }
View Full Code Here

        showSps(((JCheckBoxMenuItem) event.getSource()).getState());
      }
    });
   
    JMenuItem tailing = new JCheckBoxMenuItem("Tailing");
    tailing.addActionListener(new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent event) {
        setTailing(((JCheckBoxMenuItem) event.getSource()).getState());
      }
View Full Code Here

        setTailing(((JCheckBoxMenuItem) event.getSource()).getState());
      }
    });
   
    JMenuItem grid = new JCheckBoxMenuItem("Grid");
    grid.addActionListener(new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent event) {
        setGridLines(((JCheckBoxMenuItem) event.getSource()).getState());
      }
View Full Code Here

    viewMenu.setMnemonic( KeyEvent.VK_V );
    super.add( viewMenu );

    JCheckBoxMenuItem showClosedProjects = new JCheckBoxMenuItem( "Show Closed Projects" );
    showClosedProjects.setActionCommand( Integer.toString( ACTION_SHOW_CLOSED_PROJECTS ) );
    showClosedProjects.addActionListener( this );
    viewMenu.add( showClosedProjects );

    JCheckBoxMenuItem showCompletedItems = new JCheckBoxMenuItem( "Show Completed Items" );
    showCompletedItems.setActionCommand( Integer.toString( ACTION_SHOW_COMPLETED_ITEMS ) );
    showCompletedItems.addActionListener( this );
View Full Code Here

    showClosedProjects.addActionListener( this );
    viewMenu.add( showClosedProjects );

    JCheckBoxMenuItem showCompletedItems = new JCheckBoxMenuItem( "Show Completed Items" );
    showCompletedItems.setActionCommand( Integer.toString( ACTION_SHOW_COMPLETED_ITEMS ) );
    showCompletedItems.addActionListener( this );
    viewMenu.add( showCompletedItems );

    //-------------------------------------------------
    this.helpMenu = new JMenu( "Help" );
    this.helpMenu.setMnemonic( KeyEvent.VK_H );
View Full Code Here

    /* Backup picture files */
    JCheckBoxMenuItem cbMenuItem = new JCheckBoxMenuItem(
        "Backup picture files");
    cbMenuItem
        .setToolTipText("backup all picture files before changing EXIF data like addresses");
    cbMenuItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        boolean state = ((AbstractButton) ae.getSource()).getModel()
            .isSelected();
        writer.setBackupMode(state);
        logger.log(Level.FINE, "Backup picture files was set to: "
View Full Code Here

      getResourceString(prefix + ".name"));

    // Command
    String actionCommand = getResourceString(prefix + ".command");
    menuitem.setActionCommand(actionCommand);
    menuitem.addActionListener(this);
    menu.add(menuitem);
    return menuitem;
  }
}
View Full Code Here

        maMenuBar.add (aOptionsMenu);
        JCheckBoxMenuItem aCBItem;
        aCBItem = new JCheckBoxMenuItem ("Show Descriptions",
                                         Options.GetBoolean("ShowDescriptions"));
        aOptionsMenu.add (aCBItem);
        aCBItem.addActionListener (this);

        aCBItem = new JCheckBoxMenuItem ("Show Names",
                                         Options.GetBoolean ("ShowNames"));
        aOptionsMenu.add (aCBItem);
        aCBItem.addActionListener (this);
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.