Changeset 1419


Ignore:
Timestamp:
09/06/06 11:43:53 (14 years ago)
Author:
chris
Message:

Browser:
1) made MetadataNotebook the new way to edit/view metadata when
the metadata button is pressed.

Notebook:
1) Normal view now starts on the first Image tab, not Project.
2) Dropdown combo boxes are now more descriptive for internal
references based on a new attribute "RefVars" in Template.xml
For now, these boxes do not reflect any user changes to the
attributes immediately, if for no other reason, that's a lot
of operations to do every time anyone changes anything. Perhaps
I'll add an "Update References" option eventually or something.
3) Buttons are now the default size since I don't set preferred
size anywhere anymore.
4) Added a file LOCIDefs.ome which holds "custom" elements like
LaserCoordinates and defines them for use in LOCI.
5) Fixed the problem with the "Goto" buttons when there was no
scrollbar. Should scroll better on ones with the scrollbar as
well since the Layout was reworked and the goto stuff was thus
outdated.
6) Made a new menu Options which allows the user to display the
ID attributes. Currently these attributes are editable, which
is somewhat buggy. Technically any time one of these are editted
the GUI should be remade.

Location:
trunk/loci
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataNotebook.java

    r1383 r1419  
    8181   
    8282  /**The checkboxes that switch between the four views.*/ 
    83   protected JCheckBoxMenuItem advView, noteView, normView, scanView; 
     83  protected JCheckBoxMenuItem advView, noteView, normView, scanView, 
     84    showID; 
    8485 
    8586  // -- Constructors -- 
     87 
     88  public MetadataNotebook() { 
     89    this((String[]) null,true,true); 
     90  } 
    8691 
    8792  /** Create a default notebook window with save function and editing enabled.*/ 
     
    122127    scanP.setEditable(editable); 
    123128 
    124     //create a MetadataPane, where most everything happens 
    125     if (args.length > 0) { 
    126       File file = null; 
    127       try { 
    128         file = new File(args[0]); 
    129       } 
    130       catch (Exception exc) { 
    131         System.out.println("Error occured: You suck."); 
    132       } 
    133       currentFile = file; 
    134       metadata = new MetadataPane(file, addSave, editable); 
    135       setTitle("OME Metadata Notebook - " + file); 
     129    //create a MetadataPane, where most everything happen 
     130    if (args != null) { 
     131      if(args.length > 0) { 
     132        File file = null; 
     133        try { 
     134          file = new File(args[0]); 
     135        } 
     136        catch (Exception exc) { 
     137          System.out.println("Error occured: You suck."); 
     138        } 
     139        currentFile = file; 
     140        metadata = new MetadataPane(file, addSave, editable); 
     141        setTitle("OME Metadata Notebook - " + file); 
     142      } 
    136143    } 
    137144    else metadata = new MetadataPane((File)null, addSave, editable); 
     
    185192    fileSaveAs.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, 
    186193      KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK)); 
     194    fileSaveAs.setEnabled(addSave); 
    187195    JSeparator jSep = new JSeparator(); 
    188196    file.add(jSep); 
     
    245253    exportItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, MENU_MASK)); 
    246254 
     255    JMenu options = new JMenu("Options"); 
     256    options.setMnemonic('o'); 
     257    menubar.add(options); 
     258    showID = new JCheckBoxMenuItem("Show IDs"); 
     259    showID.setSelected(false); 
     260    options.add(showID); 
     261    showID.addItemListener(this); 
     262    showID.setMnemonic('i'); 
     263    showID.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, MENU_MASK)); 
     264 
    247265    JMenu help = new JMenu("Help"); 
    248266    help.setMnemonic('h'); 
     
    262280 
    263281    //useful frame method that handles closing of window 
    264     setDefaultCloseOperation(EXIT_ON_CLOSE); 
     282    setDefaultCloseOperation(DISPOSE_ON_CLOSE); 
    265283    //put frame in the right place, with the right size, and make visible 
    266284    setLocation(100, 100); 
     
    432450  public void itemStateChanged(ItemEvent e) { 
    433451    if (e.getStateChange() == ItemEvent.SELECTED &&  
    434       (JCheckBoxMenuItem) e.getItem() == advView) { 
     452      (JCheckBoxMenuItem) e.getItem() == advView)  
     453    { 
    435454      noteView.setState(false); 
    436455      normView.setState(false); 
     
    445464    } 
    446465    else if (e.getStateChange() == ItemEvent.SELECTED &&  
    447       (JCheckBoxMenuItem) e.getItem() == noteView) { 
     466      (JCheckBoxMenuItem) e.getItem() == noteView)  
     467    { 
    448468      advView.setState(false); 
    449469      normView.setState(false); 
     
    458478    } 
    459479    else if (e.getStateChange() == ItemEvent.SELECTED &&  
    460       (JCheckBoxMenuItem) e.getItem() == scanView) { 
     480      (JCheckBoxMenuItem) e.getItem() == scanView)  
     481    { 
    461482      noteView.setState(false); 
    462483      advView.setState(false); 
     
    470491    } 
    471492    else if (e.getStateChange() == ItemEvent.SELECTED &&  
    472       (JCheckBoxMenuItem) e.getItem() == normView) { 
     493      (JCheckBoxMenuItem) e.getItem() == normView)  
     494    { 
    473495      advView.setState(false); 
    474496      noteView.setState(false); 
     
    479501      tabsMenu.setEnabled(true); 
    480502      fileNew.setEnabled(true); 
    481       metadata.setupTabs(metadata.getRoot()); 
     503      metadata.reRender(); 
    482504      metadata.setVisible(true); 
     505    } 
     506    else if (e.getStateChange() == ItemEvent.SELECTED &&  
     507      (JCheckBoxMenuItem) e.getItem() == showID)  
     508    { 
     509      metadata.showIDs = true; 
     510      metadata.reRender(); 
     511    } 
     512    else if (e.getStateChange() == ItemEvent.DESELECTED &&  
     513      (JCheckBoxMenuItem) e.getItem() == showID)  
     514    { 
     515      metadata.showIDs = false; 
     516      metadata.reRender(); 
    483517    } 
    484518    else { 
     
    492526              tabsMenu.setEnabled(true); 
    493527              fileNew.setEnabled(true); 
    494               metadata.setupTabs(metadata.getRoot()); 
     528              metadata.reRender(); 
    495529              metadata.setVisible(true); 
    496530      } 
  • trunk/loci/ome/notebook/MetadataPane.java

    r1375 r1419  
    122122  protected boolean editable; 
    123123 
     124  /**Whether or not to display ID attributes. By default, is false.*/ 
     125  protected boolean showIDs; 
     126 
    124127  /** Holds the original file if it is of TIFF format.*/ 
    125128  protected File originalTIFF; 
     
    186189    img = null; 
    187190    thumb = null; 
     191    showIDs = false; 
    188192 
    189193    // -- Tabbed Pane Initialization -- 
     
    296300      } 
    297301      else { 
     302/** 
    298303        thisOmeNode.writeOME(file, false); 
    299304        if (getTopLevelAncestor() instanceof MetadataNotebook) { 
     
    301306          mdn.setTitle("OME Metadata Notebook - " + file); 
    302307        } 
     308*/ 
     309        //Workaround for transform problems with writeOME(file,false); 
     310        String xml = thisOmeNode.writeOME(false); 
     311        FileWriter fw = new FileWriter(file); 
     312                          BufferedWriter bw = new BufferedWriter(fw); 
     313                          bw.write(xml); 
     314                          bw.close(); 
    303315      } 
    304316    } 
     
    536548      p.setEditor(); 
    537549    } 
     550     
     551    //set the displayed tab to be by default the first image 
     552    TabPanel firstImageTab = null; 
     553    for (int i=0;i<tabPanelList.size();i++) { 
     554      TabPanel tabP = (TabPanel) tabPanelList.get(i); 
     555      if(tabP.name.startsWith("Image")) { 
     556        firstImageTab = tabP; 
     557        break; 
     558      } 
     559    } 
     560    if (firstImageTab != null) { 
     561      Container anObj = (Container) firstImageTab; 
     562      while (!(anObj instanceof JScrollPane)) { 
     563        anObj = anObj.getParent(); 
     564      } 
     565      JScrollPane jScr = (JScrollPane) anObj; 
     566      tabPane.setSelectedComponent(jScr); 
     567    } 
    538568 
    539569    stateChanged(false); 
     
    664694      TablePanel p = (TablePanel) panelList.get(i); 
    665695      p.setEditor(); 
     696    } 
     697     
     698     
     699    //set the displayed tab to be by default the first image 
     700    TabPanel firstImageTab = null; 
     701    for (int i=0;i<tabPanelList.size();i++) { 
     702      TabPanel tabP = (TabPanel) tabPanelList.get(i); 
     703      if(tabP.name.startsWith("Image")) { 
     704        firstImageTab = tabP; 
     705        break; 
     706      } 
     707    } 
     708    if (firstImageTab != null) { 
     709      Container anObj = (Container) firstImageTab; 
     710      while (!(anObj instanceof JScrollPane)) { 
     711        anObj = anObj.getParent(); 
     712      } 
     713      JScrollPane jScr = (JScrollPane) anObj; 
     714      tabPane.setSelectedComponent(jScr); 
    666715    } 
    667716  } 
     
    11471196 
    11481197    /** Convert this TabPanel into a String.*/ 
    1149     public String toString() { return el == null ? "null" : el.getTagName(); } 
     1198    public String toString() { return el == null ? "null" :  
     1199      "Name: " + name + " Element: " + el.getTagName(); } 
    11501200 
    11511201    /** Implement these scrollable methods to make resizing behave.*/ 
     
    11871237    public String name; 
    11881238     
     1239    /** 
     1240    * An String to hold misc data we want to display to distinguish 
     1241    * the name presented for this as an internal reference. 
     1242    */ 
     1243    public String refDetails; 
     1244     
    11891245    /**The ClickableTable that displays this TablePanel's metadata.*/ 
    11901246    public ClickableTable table; 
     
    12451301      String thisName = name; 
    12461302      panelList.add(this); 
    1247  
     1303       
     1304      //for debuging this simple parser 
     1305      final boolean debug = false; 
     1306 
     1307      //Check which "types" the various template attributes are and 
     1308      //group them into Vectors. 
    12481309      Vector fullList = DOMUtil.getChildElements("OMEAttribute",e); 
    12491310      attrList = new Vector(); 
     
    12631324            refList.add(thisE); 
    12641325          } 
    1265           else if (thisE.getAttribute("Type").equals("ID") && oNode != null) { 
     1326          else if (thisE.getAttribute("Type").equals("ID") && oNode != null 
     1327            && !showIDs) { 
    12661328            if (oNode.getDOMElement().hasAttribute("ID")) { 
    12671329              id = oNode.getAttribute("ID"); 
     
    12691331            } 
    12701332          } 
     1333          else if (thisE.getAttribute("Type").equals("ID") && oNode != null 
     1334            && showIDs) { 
     1335            if (oNode.getDOMElement().hasAttribute("ID")) { 
     1336              id = oNode.getAttribute("ID"); 
     1337              panelsWithID.add(this); 
     1338              attrList.add(thisE); 
     1339            } 
     1340          } 
    12711341          else attrList.add(thisE); 
    12721342        } 
    12731343        else attrList.add(thisE); 
    12741344      } 
     1345       
     1346      //Set up the details for internal reference names 
     1347      refDetails = e.getAttribute("RefVars"); 
     1348      if(debug) System.out.println(); 
     1349      if(debug)   System.out.println(name + " - " + refDetails); 
     1350      boolean noDetails = true; 
     1351      int openIndex = refDetails.indexOf('%'); 
     1352      while(openIndex >= 0) { 
     1353        if(debug) System.out.println(openIndex + " " + refDetails.charAt(openIndex)); 
     1354        int closeIndex = refDetails.indexOf('%',openIndex + 1); 
     1355        if(debug) System.out.println(closeIndex + " " + refDetails.charAt(closeIndex)); 
     1356        String thisCommand = refDetails.substring(openIndex + 1,closeIndex); 
     1357        if(debug) System.out.println("Command: " + thisCommand); 
     1358        String processed = refDetails.substring(0,openIndex); 
     1359        if(debug) System.out.println("Processed: " + processed); 
     1360        String remnants = refDetails.substring(closeIndex+1,refDetails.length()); 
     1361        if(debug) System.out.println("Remnants: " + remnants); 
     1362         
     1363        boolean addThisCommand = false; 
     1364        int varIndex = thisCommand.indexOf('$'); 
     1365        while(varIndex >=0) { 
     1366          if(debug) System.out.println("varIndex: " + varIndex + " " + thisCommand.charAt(varIndex)); 
     1367          int endIndex = thisCommand.indexOf(' ', varIndex + 1); 
     1368          if (endIndex < 0) endIndex = thisCommand.length(); 
     1369          if(debug) System.out.println("endIndex: " + endIndex); 
     1370          String prefix = thisCommand.substring(0,varIndex); 
     1371          if(debug) System.out.println("Prefix: " + prefix); 
     1372          String thisVar = thisCommand.substring(varIndex+1,endIndex); 
     1373          if(debug) System.out.println("thisVar: " + thisVar); 
     1374          String suffix; 
     1375          if(endIndex != thisCommand.length()) 
     1376            suffix = thisCommand.substring(endIndex + 1,thisCommand.length()); 
     1377          else suffix = ""; 
     1378          if(debug) System.out.println("Suffix: " + suffix); 
     1379          String value = null; 
     1380          if (oNode != null) { 
     1381            value = oNode.getAttribute(thisVar); 
     1382          } 
     1383          if (value != null) { 
     1384            if (!value.equals("")) { 
     1385              addThisCommand = true; 
     1386            } 
     1387          } 
     1388          else value = ""; 
     1389          if(debug) System.out.println("Value: " + value); 
     1390          thisCommand = prefix + value + suffix; 
     1391          if(debug) System.out.println("thisCommand: " + thisCommand); 
     1392           
     1393          varIndex = thisCommand.indexOf('$'); 
     1394        } 
     1395        if (addThisCommand) { 
     1396          noDetails = false; 
     1397          refDetails = processed + " (" + thisCommand + ")" + remnants; 
     1398        } 
     1399        else refDetails = processed + remnants; 
     1400        if(debug) System.out.println("refDetails: " + refDetails); 
     1401         
     1402        openIndex = refDetails.indexOf('%'); 
     1403      } 
     1404      if(debug) System.out.println(name + " - " + refDetails); 
     1405      if(showIDs) refDetails = refDetails + " (ID: " + id + ")"; 
    12751406 
    12761407      Element cDataEl = DOMUtil.getChildElement("CData",e); 
     
    12921423 
    12931424      noteButton = new JButton("Notes"); 
    1294       noteButton.setPreferredSize(new Dimension(85,17)); 
     1425//      noteButton.setPreferredSize(new Dimension(85,17)); 
    12951426      noteButton.addActionListener(this); 
    12961427      noteButton.setActionCommand("getNotes"); 
     
    13451476 
    13461477      addButton = new JButton("New Table"); 
    1347       addButton.setPreferredSize(new Dimension(110,17)); 
     1478//      addButton.setPreferredSize(new Dimension(130,17)); 
    13481479      addButton.addActionListener(table); 
    13491480      addButton.setActionCommand("bigAdd"); 
     
    13541485 
    13551486      delButton = new JButton("Delete Table"); 
    1356       delButton.setPreferredSize(new Dimension(110,17)); 
     1487//      delButton.setPreferredSize(new Dimension(130,17)); 
    13571488      delButton.addActionListener(table); 
    13581489      delButton.setActionCommand("bigRem"); 
     
    14801611                if (value.equals(tp.id)) { 
    14811612                  isLocal = true; 
    1482                   model.setValueAt(tp.name,i,1); 
     1613                  if(tp.refDetails != null && !tp.refDetails.equals("")) 
     1614                    model.setValueAt(tp.name + " - " + tp.refDetails,i,1); 
     1615                  else model.setValueAt(tp.name,i,1); 
    14831616                } 
    14841617              } 
     
    15181651          for (int i = 0;i<panelsWithID.size();i++) { 
    15191652            aPanel = (TablePanel) panelsWithID.get(i); 
    1520             if (aPanel.name.equals(aName)) whichNum = i; 
     1653            if (aName.startsWith(aPanel.name)) whichNum = i; 
    15211654          } 
    15221655 
     
    15361669            Point loc = tablePan.getLocation(); 
    15371670            loc.x = 0; 
    1538             loc.y = tp.titlePanel.getHeight() + loc.y; 
    1539             jScr.getViewport().setViewPosition(loc); 
     1671            JViewport jView = jScr.getViewport(); 
     1672            if(jView.getExtentSize().getHeight() < 
     1673              jView.getViewSize().getHeight()) 
     1674                jScr.getViewport().setViewPosition(loc); 
    15401675          } 
    15411676          else { 
  • trunk/loci/ome/notebook/NotePanel.java

    r1370 r1419  
    129129 
    130130    JButton addBTN = new JButton("New Note"); 
    131     addBTN.setPreferredSize(new Dimension(100,17)); 
     131//    addBTN.setPreferredSize(new Dimension(120,17)); 
    132132    addBTN.setActionCommand("add"); 
    133133    addBTN.addActionListener(noteList); 
     
    138138 
    139139    JButton delBTN = new JButton("Delete Note"); 
    140     delBTN.setPreferredSize(new Dimension(100,17)); 
     140//    delBTN.setPreferredSize(new Dimension(120,17)); 
    141141    delBTN.setActionCommand("remove"); 
    142142    delBTN.addActionListener(noteList); 
  • trunk/loci/ome/notebook/Template.xml

    r1370 r1419  
    11<?xml version="1.0" ?> 
    22<NotebookTemplate Version="1.0"> 
    3         <OMEElement XMLName="Project" Description="Data having to do with this project."> 
    4             <OMEAttribute XMLName="ID"  Type="ID"/> 
    5                 <OMEAttribute XMLName="Name"  Description="The name of this project."/> 
     3        <OMEElement XMLName="Project" Description="Data having to do with this project." RefVars="%Name: $Name%"> 
     4          <OMEAttribute XMLName="ID"  Type="ID"/> 
     5          <OMEAttribute XMLName="Name"  Description="The name of this project."/> 
    66                <OMEAttribute XMLName="Experimenter" Type="Ref" Description="Refers to the experimenter doing the project."/>    
    77                <OMEAttribute XMLName="Group" Type="Ref" Description="Refers to the group doing the project."/> 
     
    1212                <OMEAttribute XMLName="Contact" Type="Ref" Description="Who to contact in this group."/> 
    1313        </OMEElement> 
    14         <OMEElement XMLName="Dataset" Description="Information about the dataset."> 
     14        <OMEElement XMLName="Dataset" Description="Information about the dataset." RefVars="%Name: $Name%"> 
    1515                <OMEAttribute XMLName="ID"  Type="ID"/> 
    16                 <OMEAttribute XMLName="Name"  Description="The name of this dataset."/> 
    17                 <OMEAttribute XMLName="Locked"  Description="Whether or not this experiment is locked."/> 
     16          <OMEAttribute XMLName="Name"  Description="The name of this dataset."/> 
     17          <OMEAttribute XMLName="Locked"  Description="Whether or not this experiment is locked."/> 
    1818                <OMEAttribute XMLName="Experimenter" Type="Ref" Description="Refers to the experimenter associated with this dataset"/>  
    1919                <OMEAttribute XMLName="Group" Type="Ref" Description="Refers to the group associated with this dataset."/> 
    2020        </OMEElement> 
    21         <OMEElement XMLName="Image" Description="Information about the image acquired."> 
     21        <OMEElement XMLName="Image" Description="Information about the image acquired." RefVars="%Name: $Name%%Date Created: $CreationDate%"> 
    2222                <OMEAttribute XMLName="ID"  Type="ID"/> 
    2323                <OMEAttribute XMLName="Description" Type="Desc"/> 
     
    2626                <OMEAttribute XMLName="Experimenter" Type="Ref" Description="Refers to the experimenter associated with this image."/> 
    2727                <OMEAttribute XMLName="DefaultPixels" Type="Ref" Description="Refers to the pixels that are in this image."/> 
    28                 <OMEElement XMLName="LogicalChannel" Description="The Channel associated with this image."> 
     28                <OMEElement XMLName="LogicalChannel" Description="The Channel associated with this image." RefVars="%Name: $Name%"> 
    2929                        <OMEAttribute XMLName="ID"  Type="ID"/> 
    3030                        <OMEAttribute XMLName="Name" Description="The name of this LogicalChannel."/> 
     
    3434                        <OMEAttribute XMLName="Filter" Type="Ref" Description="Refers to the filter used in this LogicalChannel."/> 
    3535                </OMEElement> 
    36                 <OMEElement XMLName="Pixels" Description="The Pixels associated with this element."> 
     36                <OMEElement XMLName="Pixels" Description="The Pixels associated with this element." RefVars="%Type: $PixelType%"> 
    3737                        <OMEAttribute XMLName="ID" Type="ID"/> 
    3838                        <OMEAttribute XMLName="SizeX" Description="The x coordinate size of these pixels."/> 
     
    4343                        <OMEAttribute XMLName="PixelType" Description="Describes the type of pixels used."/> 
    4444                </OMEElement> 
    45                 <OMEElement XMLName="LaserCoordinates" Description="The coordinates of the laser."> 
     45                <OMEElement XMLName="LaserCoordinates" Description="The coordinates of the laser." RefVars="%Type: $Type%"> 
    4646                        <OMEAttribute XMLName="ID" Type="ID"/> 
    4747                        <OMEAttribute XMLName="Laser" Type="Ref" Description="The laser refered to by these coordinates."/> 
     
    5454                </OMEElement> 
    5555        </OMEElement> 
    56         <OMEElement XMLName="Experiment" Description="Describes the experiment."> 
     56        <OMEElement XMLName="Experiment" Description="Describes the experiment." RefVars="%Type: $Type%"> 
    5757                <OMEAttribute XMLName="ID" Type="ID"/> 
    58                 <OMEAttribute XMLName="Type"  Description="The type of experiment this was."/> 
     58          <OMEAttribute XMLName="Type"  Description="The type of experiment this was."/> 
    5959                <OMEAttribute XMLName="Description" Description="A brief description of the experiment." Type="Desc"/> 
    6060                <OMEAttribute XMLName="Experimenter" Type="Ref" Description="Refers to the experimenter associated with this experiment."/> 
    6161        </OMEElement> 
    62         <OMEElement XMLName="Experimenter" Description="Information about the person who did the experiment."> 
     62        <OMEElement XMLName="Experimenter" Description="Information about the person who did the experiment." RefVars="%Name: $FirstName  $LastName%%Email: $Email%"> 
    6363                <OMEAttribute XMLName="ID"  Type="ID"/> 
    6464                <OMEAttribute XMLName="FirstName" Description="The experimenter's first name."/> 
     
    6868                <OMEAttribute XMLName="Group" Type="Ref" Description="Refers to the group associated with this experimenter."/>          
    6969        </OMEElement> 
    70         <OMEElement XMLName="Instrument" Description="Describes the instrument used."> 
     70        <OMEElement XMLName="Instrument" Description="Describes the instrument used." RefVars="%Manufacturer: $Manufacturer%%Model: $Model%%Type: $Type%%Serial Number: $SerialNumber%"> 
    7171                <OMEAttribute XMLName="ID"  Type="ID"/>          
    7272                <OMEAttribute XMLName="Manufacturer"  Description="The manufacturer of this instrument."/> 
     
    7575                <OMEAttribute XMLName="Type"  Description="The type of instrument this was."/> 
    7676        </OMEElement> 
    77   <OMEElement XMLName="LightSource" Description="Information about the light source of some instrument."> 
     77  <OMEElement XMLName="LightSource" Description="Information about the light source of some instrument." RefVars="%Manufacturer: $Manufacturer%%Model: $Model%%Serial Number: $SerialNumber%"> 
    7878                <OMEAttribute XMLName="ID"  Type="ID"/>          
    7979                <OMEAttribute XMLName="Manufacturer"  Description="The manufacturer of this light source."/> 
     
    8282                <OMEAttribute XMLName="Instrument"  Description="Refers to the instrument this light source was for." Type="Ref"/> 
    8383        </OMEElement> 
    84         <OMEElement XMLName="Laser" Description="Information about the laser for some light source."> 
     84        <OMEElement XMLName="Laser" Description="Information about the laser for some light source." RefVars="%Type: $Type%%Medium: $Medium%%Wavelength: $Wavelength%"> 
    8585                <OMEAttribute XMLName="ID"  Type="ID"/>          
    8686                <OMEAttribute XMLName="Medium"  Description="The medium used for this laser."/> 
     
    8989                <OMEAttribute XMLName="LightSource"  Description="Refers to the light source this laser was associated with." Type="Ref"/> 
    9090        </OMEElement> 
    91         <OMEElement XMLName="Detector" Description="Information about the detector of some instrument."> 
     91        <OMEElement XMLName="Detector" Description="Information about the detector of some instrument." RefVars="%Manufacturer: $Manufacturer%%Model: $Model%%Type: $Type%%Serial Number: $SerialNumber%%Gain: $Gain%"> 
    9292                <OMEAttribute XMLName="ID"  Type="ID"/>          
    9393                <OMEAttribute XMLName="Gain"  Description="The gain setting for this detector."/> 
     
    102102    <OMEAttribute XMLName="Instrument"  Description="Refers to the instrument this filter was for." Type="Ref"/> 
    103103        </OMEElement> 
    104         <OMEElement XMLName="Objective" Description="Info relating to the experiment's objective."> 
     104        <OMEElement XMLName="Objective" Description="Info relating to the experiment's objective." RefVars="%Manufacturer: $Manufacturer%%Model: $Model%%Serial Number: $SerialNumber%%Magnification: $Magnification%"> 
    105105                <OMEAttribute XMLName="ID"  Type="ID"/> 
    106106                <OMEAttribute XMLName="Manufacturer" /> 
     
    110110                <OMEAttribute XMLName="Magnification"/> 
    111111        </OMEElement> 
    112         <OMEElement XMLName="OTF" Description="Whatever an OTF is."> 
     112        <OMEElement XMLName="OTF" Description="An OTF." RefVars="%Pixel Type: $PixelType%%Optical Axis Average: $OpticalAxisAverage%%Size X: $SizeX%%Y: $SizeY%"> 
    113113                <OMEAttribute XMLName="ID"  Type="ID"/> 
    114114                <OMEAttribute XMLName="PixelType" /> 
  • trunk/loci/ome/notebook/TemplateParser.java

    r1370 r1419  
    4848    "Experiment.ome","Experimenter.ome","Group.ome","Image.ome", 
    4949    "Instrument.ome","Plate.ome","Screen.ome","OMEIS/Repository.ome", 
    50     "OMEIS/OriginalFile.ome" 
     50    "OMEIS/OriginalFile.ome","LOCIDefs.ome" 
    5151  }; 
    5252 
  • trunk/loci/ome/notebook/VariableComboEditor.java

    r1371 r1419  
    134134    for (int i = 0;i<idPanels.size();i++) { 
    135135      MetadataPane.TablePanel tp = (MetadataPane.TablePanel) idPanels.get(i); 
    136       jrb.addItem(tp.name); 
     136      if(tp.refDetails != null && !tp.refDetails.equals("")) 
     137        jrb.addItem(tp.name + " - " + tp.refDetails); 
     138      else jrb.addItem(tp.name); 
    137139    } 
    138140    //add external references 
     
    181183            tpClass.equals("org.openmicroscopy.xml.st." + type + "Node"); 
    182184          //if the node is of the right type, add it to the combobox 
    183           if (isCorrectType) thisBox.addItem(tp.name); 
     185          if (isCorrectType && !tp.refDetails.equals("")) 
     186            thisBox.addItem(tp.name + " - " + tp.refDetails); 
     187          else if(isCorrectType && tp.refDetails.equals("")) thisBox.addItem(tp.name); 
    184188        } 
    185189 
     
    235239          MetadataPane.TablePanel tp = 
    236240            (MetadataPane.TablePanel) idPanels.get(i); 
    237           if (data.equals(tp.name)) thisID = tp.id; 
     241          if (data.startsWith(tp.name)) thisID = tp.id; 
    238242        } 
    239243        //if an internal reference was found, set the node tree 
  • trunk/loci/ome/notebook/WiscScanPane.java

    r1381 r1419  
    1 // 
    2 // WiscScanPane.java 
    3 // 
    4  
    5 /* 
    6 OME Metadata Notebook application for exploration and editing of OME-XML and 
    7 OME-TIFF metadata. Copyright (C) 2006 Christopher Peterson. 
    8  
    9 This program is free software; you can redistribute it and/or modify 
    10 it under the terms of the GNU Library General Public License as published by 
    11 the Free Software Foundation; either version 2 of the License, or 
    12 (at your option) any later version. 
    13  
    14 This program is distributed in the hope that it will be useful, 
    15 but WITHOUT ANY WARRANTY; without even the implied warranty of 
    16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    17 GNU Library General Public License for more details. 
    18  
    19 You should have received a copy of the GNU Library General Public License 
    20 along with this program; if not, write to the Free Software 
    21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    22 */ 
    23  
    241package loci.ome.notebook; 
    252 
     
    344321  public void setEditable(boolean editable) { 
    345322//      groupBox.setEditable(editable); 
    346       exB.setEditable(editable); 
    347 //      wheeB.setEditable(editable); 
    348 //      hoB.setEditable(editable); 
     323      exB.setEnabled(editable); 
     324//      wheeB.setEnabled(editable); 
     325//      hoB.setEnabled(editable); 
    349326      tiC.setEnabled(editable); 
    350327      phC.setEnabled(editable); 
  • trunk/loci/plugins/browser/CustomWindow.java

    r1346 r1419  
    3535import javax.swing.event.ChangeEvent; 
    3636import javax.swing.event.ChangeListener; 
    37 import loci.ome.viewer.MetadataPane; 
     37import loci.ome.notebook.MetadataNotebook; 
    3838 
    3939public class CustomWindow extends ImageWindow implements ActionListener, 
     
    456456    if (cmd == null) cmd = ""; // prevent NullPointer 
    457457    if (cmd.equals("xml")) { 
     458/* 
    458459      FileInfo fi = imp.getOriginalFileInfo(); 
    459460      String description = fi == null ? "" : fi.description; 
     
    470471      // (older versions of ImageJ truncate the final character) 
    471472      if (description.endsWith("</OME")) description += ">"; 
    472  
     473       
    473474      // pop up a new metadata viewer dialog 
    474475      JFrame meta = new JFrame("Metadata - " + getTitle()); 
     
    479480      GUI.center(meta); 
    480481      meta.setVisible(true); 
     482*/ 
     483      String [] args = {db.filename}; 
     484      MetadataNotebook metaNote = new MetadataNotebook(args,false,false); 
    481485    } 
    482486    else if (cmd.equals("options")) { 
  • trunk/loci/plugins/browser/LociDataBrowser.java

    r1394 r1419  
    329329  } 
    330330 
     331  /** Main method, for testing. */ 
     332  public static void main(String[] args) { 
     333    new ImageJ(null); 
     334    new LociDataBrowser().run(""); 
     335  } 
     336 
    331337} 
Note: See TracChangeset for help on using the changeset viewer.