RE: specifying fields from input file

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 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 (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 is the right class to
modify or if adding code to under keyPressed(KeyEvent e){
  else if (keyCode == KeyEvent.VK_CONTROL) {
        allow multiple cell selections...

would require fewer changes. 
Do you have any recommendations?


Michelle Kam           (408) 742-2881
Lockheed Martin Space Systems Co. SSM/ATC/MSIS
B/153 O/L922 
1111 Lockheed Martin Way, Sunnyvale, CA 94089

-----Original Message-----
From: Curtis Rueden [mailto:curtis@xxxxxxxxxxxxx]
Sent: Monday, June 23, 2003 5:44 PM
To: Kam, Michelle C
Subject: RE: specifying fields from input file

Hi Michelle,

>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
>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
>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. 


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: