This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Craig- > Thank you for the new user support, Don! That's what we're here for! ;-) > You guys gotta purchase a new dual-core Intel MacBook Pro laptop to > test on. With virtualization software, you can run Mac OS X, Windows > and Linux all at the same time and cut-and-paste between the OSes. That would be nice! > Regarding the right-click issue, below is a message that was posted to > Apple's java-dev mailing list a few years ago. Thanks for the info. Actually, an even easier solution is to get a 2 button mouse. ;-) Especially if you are going to run the system described above! > Thanks again! > Craig > > Control-clicking > > This could be a bug or a feature depending on one's philosophy. Since the > Mac mouse only has one button, the concept of initiating dragging via a > non-existent second button is muddy at best. Control-clicking is a > semi-substitute for Right-clicking on Windows, but really it's just a > trigger for a context-sensitive menu, it's not *actually* a "Right-click." > > Has anyone else run into this problem? > > Yes, today. I have verified the behavior you describe. > > Have you found a workaround? > > I think so...maybe. Give this a try and see. Keep in mind it's still a > work-around...I'm just consuming mouseMoved events and re-dispatching them > as mouseDragged events if certain conditions are met. The code below > demonstrates the problem, but if you un-comment the call to > addAWTEventListener() in main(), you should start getting mouseDragged > events for control-drag operations without having to change any of your > existing code. > > ////////////////////////////////////////////////////////// > > import javax.swing.JFrame; > import java.awt.*; > import java.awt.event.*; > > /** > * Created by IntelliJ IDEA. > * User: Rob Ross > * Date: Sep 16, 2003 > * Time: 5:17:15 PM > * > * JFrame Template > */ > > public class TestFrame extends JFrame implements MouseMotionListener > { > public TestFrame() > { > init(); > } > > private void init() > { > getContentPane().setLayout(new BorderLayout()); > setSize(400, 300); > setTitle("TestFrame"); > addMouseMotionListener(this); > this.setLocation(100, 100); > setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); > this.addWindowListener(new WindowAdapter() { > public void windowClosing(WindowEvent e) { > super.windowClosing(e); > dispose(); > } > > public void windowClosed(WindowEvent e) { > super.windowClosed(e); > System.exit(0); > } > }); > } > > public static void main(String[] args) { > JFrame myFrame = new TestFrame(); > > //install AWTEventListener > /* > Toolkit.getDefaultToolkit().addAWTEventListener( > new ControlDragFixer(),AWTEvent.MOUSE_EVENT_MASK | > AWTEvent.MOUSE_MOTION_EVENT_MASK); > */ > myFrame.setVisible(true); > } > > public void mouseDragged(MouseEvent e){ > > long t = System.currentTimeMillis(); > System.out.println("mouseDragged "+t); > } > > > public void mouseMoved(MouseEvent e) { > long t = System.currentTimeMillis(); > System.out.println("mouseMoved "+t); > > } > } > > class ControlDragFixer implements AWTEventListener > { > boolean buttonDown = false; > > > public void eventDispatched(AWTEvent event) { > > if (event instanceof MouseEvent) > { > MouseEvent e = (MouseEvent)event; > int eventID = e.getID(); > switch (eventID) > { > case MouseEvent.MOUSE_RELEASED: > buttonDown = false; > break; > case MouseEvent.MOUSE_PRESSED: > if (e.isControlDown()) > { > buttonDown = true; > //capture the state of the mouse button at this > time since > //subsequent MouseMoved events don't provide > this information > } > break; > case MouseEvent.MOUSE_MOVED: > if (e.isControlDown() && buttonDown ) > { > //post a mouse dragged instead of mouse moved > MouseEvent me = new > MouseEvent((Component)e.getSource(), > MouseEvent.MOUSE_DRAGGED, //this is > where the magic happens! > e.getWhen(), > e.getModifiers(), > e.getX(), > e.getY(), e.getClickCount(),false, > e.getButton()); //you might want to > change this to "fake" a 2nd button on Mac > e.consume(); //so no further processing of this > Move event happens > > Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(me); > } > break; > } > } > } > > } > > ////////////////////////////////////////////////////////// > > Quoting Unidata IDV Support <address@hidden>: > > > Hi Craig- > > > >> Institution: UNC-CEP > >> Package Version: 1.3b2 > >> Operating System: os.name:Mac OS X; os.arch:ppc; os.version:10.4.6; > >> Hardware Information: java.vendor:Apple Computer, Inc.; > >> java.version:1.5.0_06; > >> java.home:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home; > >> j3d.version:1.3.1; j3d.vendor:Apple Computer, Inc.; > >> j3d.renderer:OpenGL; > >> Inquiry: Hi, > >> > >> I'm having trouble using the new grid subsetting feature in IDV 1.3b2 and > >> I'm guessing either operator error (new user big dummy me) or the > >> implementation > >> of right-clicking for Mac OS X using a single-button mouse, which should be > >> the <control> click key combination. > > > > Actually, the Apple logo key-click combo that simulates the right > > click. The docs say the Option-click, but that doesn't seem > > to work. Also, you can double click on the datasource and it > > will bring up the properties dialog (something I just learned!). > > Once you have the properties dialog up, you can do the geo-subsetting. > > > > Unfortunately, we don't have a Mac development platform in house > > at the moment so we rely on the community to verify our docs. > > I'll make the change to the docs. > > > >> One other suggestion: a new blue --> light blue --> white --> pink --> red > >> palette for temperature, just the colors blue and red, but > >> decreasing/increasing > >> in intensity/opacity. > > > > You could create one of these using the Color Table Editor. See the > > workshop docs on this subject at: > > > > http://www.unidata.ucar.edu/software/IDV/docs/workshop/resources/colortable/index.html > > > > You could also set this as the default color table for your system by > > editing the Parameter Defaults if you want. Instructions are in the > > user's guide: > > > > http://www.unidata.ucar.edu/software/IDV/docs/userguide/tools/ParameterDefaultsEditor.html > > > > and the workshop docs: > > > > http://www.unidata.ucar.edu/software/IDV/docs/workshop/resources/parameters/ParameterDefaultsEditor.html > > > > If you have questions about using these resource editors, let us know. > > > >> Thank you and Muchas Gracias for correcting the nVIDIA GeForce video card > >> problem so I can finally run IDV on my Mac -- wonderful!!! > > > > Glad it worked. > > > > Don Murray > > > > Ticket Details > > =================== > > Ticket ID: MUF-395707 > > Department: Support IDV > > Priority: Normal > > Status: Open > > > > > > > Ticket Details =================== Ticket ID: MUF-395707 Department: Support IDV Priority: Normal Status: Open