Changeset 193 for trunk/loci/visbio/view


Ignore:
Timestamp:
03/02/05 13:42:12 (15 years ago)
Author:
curtis
Message:

Fix keyboard shortcuts.

Location:
trunk/loci/visbio/view
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/CapturePanel.java

    r155 r193  
    5757    // capture button 
    5858    JButton capture = new JButton("Capture"); 
    59     if (!LAFUtil.isMacLookAndFeel()) capture.setMnemonic('a'); 
     59    if (!LAFUtil.isMacLookAndFeel()) capture.setMnemonic('p'); 
    6060    capture.setToolTipText("Creates display screenshots or movies"); 
    6161    capture.addActionListener(this); 
  • trunk/loci/visbio/view/CaptureWindow.java

    r155 r193  
    163163    record.setActionCommand("Record"); 
    164164    record.addActionListener(this); 
    165     if (!LAFUtil.isMacLookAndFeel()) record.setMnemonic('c'); 
     165    if (!LAFUtil.isMacLookAndFeel()) record.setMnemonic('r'); 
    166166    record.setToolTipText( 
    167167      "Records a movie of transitions between display positions"); 
  • trunk/loci/visbio/view/DisplayControls.java

    r169 r193  
    112112    remove = new JButton("Remove"); 
    113113    remove.addActionListener(this); 
    114     if (!LAFUtil.isMacLookAndFeel()) remove.setMnemonic('r'); 
     114    if (!LAFUtil.isMacLookAndFeel()) remove.setMnemonic('m'); 
    115115    remove.setToolTipText("Deletes the selected display"); 
    116116    remove.setEnabled(false); 
  • trunk/loci/visbio/view/DisplayWindow.java

    r186 r193  
    3636import loci.visbio.state.Dynamic; 
    3737import loci.visbio.util.*; 
    38 import visad.DisplayImpl; 
     38import visad.*; 
    3939 
    4040/** 
     
    4242 * VisAD display and associated controls. 
    4343 */ 
    44 public class DisplayWindow extends JFrame implements ActionListener, Dynamic { 
     44public class DisplayWindow extends JFrame 
     45  implements ActionListener, DisplayListener, Dynamic 
     46{ 
    4547 
    4648  // -- Static fields -- 
     
    282284 
    283285 
     286  // -- DisplayListener API methods -- 
     287 
     288  /** Listens for keyboard presses within the display. */ 
     289  public void displayChanged(DisplayEvent e) { 
     290    // CTR TODO 
     291    int id = e.getId(); 
     292    if (id == DisplayEvent.KEY_PRESSED) { 
     293      int code = e.getKeyCode(); 
     294      /*TEMP*/System.out.println("Key pressed: " + code); 
     295    } 
     296    else if (id == DisplayEvent.KEY_RELEASED) { 
     297      int code = e.getKeyCode(); 
     298      /*TEMP*/System.out.println("Key released: " + code); 
     299    } 
     300  } 
     301 
     302 
    284303  // -- Dynamic API methods -- 
    285304 
     
    320339    string = name + (threeD ? " (3D)" : " (2D)"); 
    321340 
    322     if (display == null) display = VisUtil.makeDisplay(name, threeD, STEREO); 
     341    if (display == null) { 
     342      display = VisUtil.makeDisplay(name, threeD, STEREO); 
     343      display.addDisplayListener(this); 
     344    } 
    323345    else display.setName(name); 
    324346    setTitle("Display - " + name); 
  • trunk/loci/visbio/view/StackPanel.java

    r189 r193  
    204204    // current slice visible checkbox 
    205205    sliceVisible = new JCheckBox("Current slice visible"); 
    206     if (!LAFUtil.isMacLookAndFeel()) sliceVisible.setMnemonic('u'); 
     206    if (!LAFUtil.isMacLookAndFeel()) sliceVisible.setMnemonic('l'); 
    207207    sliceVisible.setToolTipText("Toggles visibility of the current slice"); 
    208208    sliceVisible.setActionCommand("sliceVisible"); 
     
    222222    render.setActionCommand("render"); 
    223223    render.addActionListener(this); 
    224     render.setMnemonic('v'); 
     224    render.setMnemonic('r'); 
    225225 
    226226    // slider for adjusting volume resolution 
  • trunk/loci/visbio/view/TransformPanel.java

    r167 r193  
    279279    delayBurn.setActionCommand("delayBurn"); 
    280280    delayBurn.addActionListener(this); 
    281     if (!LAFUtil.isMacLookAndFeel()) delayBurn.setMnemonic('e'); 
     281    if (!LAFUtil.isMacLookAndFeel()) delayBurn.setMnemonic('n'); 
    282282    delayBurn.setToolTipText( 
    283283      "Toggles whether full-resolution burn-in is delayed"); 
     
    311311    removeTransform.setActionCommand("removeTransform"); 
    312312    removeTransform.addActionListener(this); 
    313     if (!LAFUtil.isMacLookAndFeel()) removeTransform.setMnemonic('r'); 
     313    if (!LAFUtil.isMacLookAndFeel()) removeTransform.setMnemonic('m'); 
    314314    removeTransform.setToolTipText("Removes data from this display"); 
    315315    removeTransform.setEnabled(false); 
     
    319319    dataControls.setActionCommand("dataControls"); 
    320320    dataControls.addActionListener(this); 
    321     if (!LAFUtil.isMacLookAndFeel()) dataControls.setMnemonic('i'); 
     321    if (!LAFUtil.isMacLookAndFeel()) dataControls.setMnemonic('e'); 
    322322    dataControls.setToolTipText("Shows data's controls"); 
    323323    dataControls.setEnabled(false); 
Note: See TracChangeset for help on using the changeset viewer.