Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Curtis, I'm adding the capability for a user to select multiple cells by clicking on control and the mouse button. Before I can add the vector class variable to SpreadSheet.java and add the selected cells to the vector in selectCell(), I need to first allow the user to press "control" and click with the mouse button to select cells. In KeyboardBehaviorJ3D.java (I'm making the assumption that all cells will display the image in 3D), would it be logical to call mapKeyToFunction(func, keycode, modifiers) and extend the functionKeys and functionMods arrays to store 1 more element, namely this control and mouse click? Then in execFunction(int function), add a case statement that will call SpreadSheet.selectCell()? I'm not sure if modifying KeyboardBehaviorJ3D.java is the right class to modify or if adding code to SpreadSheet.java under keyPressed(KeyEvent e){ .... else if (keyCode == KeyEvent.VK_CONTROL) { allow multiple cell selections... } would require fewer changes. Do you have any recommendations? Thanks, -----Original Message----- From: Curtis Rueden [mailto:curtis@xxxxxxxxxxxxx] Sent: Monday, June 23, 2003 5:44 PM To: User Subject: RE: specifying fields from input file Hi, >I was actually trying to either find a data structure that held all the >input fields or create one myself. If I used the method you described below >of calling getData() and then getType() and then parsing that, I have to >iterate through all the fields for each field in the data file. From the >looks of setMaps(), it seems as if the structure "dr[]" that holds Data >objects is local to setMaps() and I can't access that from VisadAPI.java >when iterating through the array. Do you know if there is a similar global >structure? Also, is there a method in BasicSSCell called parse() because I'm >not sure how you would parse() a MathType. MappingDialog extracts the ScalarTypes using visad.util.DataUtility's getScalarTypes() method (this method calls several other internal, recursive methods to which I alluded before). Check out the Javadoc on visad.util.DataUtility for more information on its usage. You should be able to getData() your data from the SSCell, then call DataUtility.getScalarTypes, passing in your data objects. -Curtis
visad
archives: