oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r963384 [1/2] - in /incubator/oodt/trunk/app/fmbrowser: ./ src/main/java/org/apache/oodt/cas/filemgr/browser/controller/ src/main/java/org/apache/oodt/cas/filemgr/browser/model/ src/main/java/org/apache/oodt/cas/filemgr/browser/system/ src/...
Date Mon, 12 Jul 2010 17:40:22 GMT
Author: mattmann
Date: Mon Jul 12 17:40:21 2010
New Revision: 963384

URL: http://svn.apache.org/viewvc?rev=963384&view=rev
Log:
- progress towards OODT-15 One trunk for all OODT components with top level build

Removed:
    incubator/oodt/trunk/app/fmbrowser/CHANGES.txt
    incubator/oodt/trunk/app/fmbrowser/LICENSE.txt
Modified:
    incubator/oodt/trunk/app/fmbrowser/pom.xml
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/WindowListener.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/Results.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/system/XmlRpcFilemgrBrowser.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/GuiParams.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/MainWindow.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/MenuBar.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/RightClickMenu.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/BottomPane.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Cell.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderCell.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderRow.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderSpacer.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/MiddlePane.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryField.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryPane.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Row.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/TablePane.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/ConnectPrompt.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java
    incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/SortPrompt.java

Modified: incubator/oodt/trunk/app/fmbrowser/pom.xml
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/pom.xml?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/pom.xml (original)
+++ incubator/oodt/trunk/app/fmbrowser/pom.xml Mon Jul 12 17:40:21 2010
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?><project>
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>gov.nasa.jpl.oodt</groupId>
+    <groupId>org.apache.oodt</groupId>
     <artifactId>oodt-core</artifactId>
-    <version>2.0</version>
+    <relativePath>../../pom.xml</relativePath>
   </parent>
   <artifactId>cas-fm-browser</artifactId>
   <name>Catalog and Archive File Management Browser</name>
@@ -14,24 +14,24 @@
      and export results of queries to the MS Excel(c) file format.</description>
   <dependencies>
     <dependency>
-      <groupId>gov.nasa.jpl.oodt</groupId>
+      <groupId>org.apache.oodt</groupId>
       <artifactId>cas-metadata</artifactId>
-      <version>1.6.0</version>
+      <version>${oodt.version}</version>
     </dependency>
     <dependency>
-      <groupId>gov.nasa.jpl.oodt</groupId>
+      <groupId>org.apache.oodt</groupId>
       <artifactId>cas-filemgr</artifactId>
-      <version>1.7.2</version>
+      <version>${oodt.version}</version>
     </dependency>
     <dependency>
       <groupId>poi</groupId>
       <artifactId>poi</artifactId>
-      <version>2.5.1-final-20040804</version>
+      <version>${poi.version}</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.2</version>
+      <version>${junit.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.controller;
 
 import java.awt.Component;
@@ -37,125 +36,133 @@ import org.apache.oodt.cas.filemgr.brows
 import org.apache.oodt.cas.filemgr.browser.view.panels.Row;
 import org.apache.oodt.cas.filemgr.browser.view.panels.TablePane;
 
-public class TableListener implements MouseListener,ActionListener{
-	
-	private Component caller;
-	private TablePane table;
-	private int mousePos;
-	private RightClickMenu rcMenu;
-	
-	public TableListener(TablePane t){
-		table = t;
-		mousePos = -1;
-		caller = null;
-		rcMenu = new RightClickMenu(this);
-		
-	}
-
-	public void mouseClicked(MouseEvent arg0) {}
-
-	public void mouseEntered(MouseEvent arg0) {}
-
-	public void mouseExited(MouseEvent e) {}
-
-	public void mousePressed(MouseEvent e) {
-			caller = e.getComponent();
-			mousePos = e.getX()+caller.getX();
-	}
-
-	public void mouseReleased(MouseEvent e) {
-		if(caller!=null){	
-			if(caller instanceof HeaderSpacer){
-				HeaderSpacer hsCaller = (HeaderSpacer)caller;
-				if(e.getModifiers()==18 && table.hiddenCols.contains(new Integer(hsCaller.getColNum()+1))){
-					rcMenu.setUnhideMode();
-					rcMenu.show(caller, e.getX(), e.getY());
-										
-				} else {
-					int change = e.getX()+caller.getX() - mousePos;
-					int curWidth = table.header.getWidth(hsCaller.getColNum());
-					table.header.changeWidth(hsCaller.getColNum(), curWidth+change);
-			
-					for(int i=1;i<table.getComponentCount();i++){
-						((Row)table.getComponent(i)).changeWidth(((HeaderSpacer)caller).getColNum(), curWidth+change+2);
-					}
-					caller = null;
-				}
-			} else {
-				if(caller instanceof HeaderCell && e.getModifiers()==18){
-					rcMenu.setHideMode();
-					rcMenu.show(caller, e.getX(), e.getY());
-					
-				}
-			}
-		}
-		
-	}
-
-	public void actionPerformed(ActionEvent arg0) {
-		if(arg0.getActionCommand().equals("Hide")){
-			if(caller!=null){
-				int colNum = ((HeaderCell)caller).getColNum();
-				table.hideColumn(colNum);
-				caller=null;
-			}
-		} else if(arg0.getActionCommand().equals("Unhide")){
-			if(caller!=null){
-				int colNum = ((HeaderSpacer)caller).getColNum()+1;
-				table.unhideColumn(colNum);
-				caller=null;
-			}
-		}else if(arg0.getActionCommand().equals("Unhide Columns")){
-			while(!table.hiddenCols.isEmpty()){
-				table.unhideColumn((table.hiddenCols.firstElement()).intValue());
-			}
-		} else if(arg0.getActionCommand().equals("Export Table")){
-			
-			final JFileChooser fc = new JFileChooser();						
-			int returnVal = fc.showSaveDialog(table);
-			if(returnVal== JFileChooser.APPROVE_OPTION){
-				
-				//write out excel file
-				String fullFileName = (fc.getSelectedFile()).getAbsolutePath();
-				if(!fullFileName.endsWith(".xls")) fullFileName+=".xls";
-				
-				HSSFWorkbook wb = new HSSFWorkbook();
-				HSSFSheet sheet = wb.createSheet("results");
-				HSSFRow headerRow = sheet.createRow((short)0);
-
-				int i=0;
-				for(int j=0;j<table.getRow(0).getComponentCount();j++){
-					if(!table.hiddenCols.contains(new Integer(j))){
-						headerRow.createCell((short)i).setCellValue(table.header.getText(j));
-						i++;
-					}
-				}
-
-				for(int k=0;k<table.getComponentCount()-1;k++){
-					HSSFRow row = sheet.createRow((short)k+1);
-					i=0;
-					for(int j=0;j<table.getRow(0).getComponentCount();j++){
-						if(!table.hiddenCols.contains(new Integer(j))){
-							row.createCell((short)i).setCellValue((table.getRow(k)).getText(j));
-							i++;
-						}
-					}
-				}
-			
-				FileOutputStream fileOut;
-				try {
-				
-					fileOut = new FileOutputStream(fullFileName);
-					wb.write(fileOut);
-					fileOut.close();
-			    
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-			}
-		    
-		}
-		
-	}
-	
+public class TableListener implements MouseListener, ActionListener {
+
+  private Component caller;
+  private TablePane table;
+  private int mousePos;
+  private RightClickMenu rcMenu;
+
+  public TableListener(TablePane t) {
+    table = t;
+    mousePos = -1;
+    caller = null;
+    rcMenu = new RightClickMenu(this);
+
+  }
+
+  public void mouseClicked(MouseEvent arg0) {
+  }
+
+  public void mouseEntered(MouseEvent arg0) {
+  }
+
+  public void mouseExited(MouseEvent e) {
+  }
+
+  public void mousePressed(MouseEvent e) {
+    caller = e.getComponent();
+    mousePos = e.getX() + caller.getX();
+  }
+
+  public void mouseReleased(MouseEvent e) {
+    if (caller != null) {
+      if (caller instanceof HeaderSpacer) {
+        HeaderSpacer hsCaller = (HeaderSpacer) caller;
+        if (e.getModifiers() == 18
+            && table.hiddenCols.contains(new Integer(hsCaller.getColNum() + 1))) {
+          rcMenu.setUnhideMode();
+          rcMenu.show(caller, e.getX(), e.getY());
+
+        } else {
+          int change = e.getX() + caller.getX() - mousePos;
+          int curWidth = table.header.getWidth(hsCaller.getColNum());
+          table.header.changeWidth(hsCaller.getColNum(), curWidth + change);
+
+          for (int i = 1; i < table.getComponentCount(); i++) {
+            ((Row) table.getComponent(i)).changeWidth(((HeaderSpacer) caller)
+                .getColNum(), curWidth + change + 2);
+          }
+          caller = null;
+        }
+      } else {
+        if (caller instanceof HeaderCell && e.getModifiers() == 18) {
+          rcMenu.setHideMode();
+          rcMenu.show(caller, e.getX(), e.getY());
+
+        }
+      }
+    }
+
+  }
+
+  public void actionPerformed(ActionEvent arg0) {
+    if (arg0.getActionCommand().equals("Hide")) {
+      if (caller != null) {
+        int colNum = ((HeaderCell) caller).getColNum();
+        table.hideColumn(colNum);
+        caller = null;
+      }
+    } else if (arg0.getActionCommand().equals("Unhide")) {
+      if (caller != null) {
+        int colNum = ((HeaderSpacer) caller).getColNum() + 1;
+        table.unhideColumn(colNum);
+        caller = null;
+      }
+    } else if (arg0.getActionCommand().equals("Unhide Columns")) {
+      while (!table.hiddenCols.isEmpty()) {
+        table.unhideColumn((table.hiddenCols.firstElement()).intValue());
+      }
+    } else if (arg0.getActionCommand().equals("Export Table")) {
+
+      final JFileChooser fc = new JFileChooser();
+      int returnVal = fc.showSaveDialog(table);
+      if (returnVal == JFileChooser.APPROVE_OPTION) {
+
+        // write out excel file
+        String fullFileName = (fc.getSelectedFile()).getAbsolutePath();
+        if (!fullFileName.endsWith(".xls"))
+          fullFileName += ".xls";
+
+        HSSFWorkbook wb = new HSSFWorkbook();
+        HSSFSheet sheet = wb.createSheet("results");
+        HSSFRow headerRow = sheet.createRow((short) 0);
+
+        int i = 0;
+        for (int j = 0; j < table.getRow(0).getComponentCount(); j++) {
+          if (!table.hiddenCols.contains(new Integer(j))) {
+            headerRow.createCell((short) i).setCellValue(
+                table.header.getText(j));
+            i++;
+          }
+        }
+
+        for (int k = 0; k < table.getComponentCount() - 1; k++) {
+          HSSFRow row = sheet.createRow((short) k + 1);
+          i = 0;
+          for (int j = 0; j < table.getRow(0).getComponentCount(); j++) {
+            if (!table.hiddenCols.contains(new Integer(j))) {
+              row.createCell((short) i).setCellValue(
+                  (table.getRow(k)).getText(j));
+              i++;
+            }
+          }
+        }
+
+        FileOutputStream fileOut;
+        try {
+
+          fileOut = new FileOutputStream(fullFileName);
+          wb.write(fileOut);
+          fileOut.close();
+
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+      }
+
+    }
+
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/WindowListener.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/WindowListener.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/WindowListener.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/WindowListener.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.controller;
 
 import java.awt.event.ActionEvent;
@@ -30,137 +29,139 @@ import org.apache.oodt.cas.filemgr.brows
 import org.apache.oodt.cas.filemgr.browser.view.prompts.QueryBuilderPrompt;
 import org.apache.oodt.cas.filemgr.browser.view.prompts.SortPrompt;
 
-public class WindowListener implements ActionListener{
+public class WindowListener implements ActionListener {
+
+  private MainWindow window;
+  private ConnectPrompt prompt;
+  private SortPrompt sort;
+  private QueryBuilderPrompt query;
+
+  private CasDB db;
+
+  public WindowListener(MainWindow m) {
+    window = m;
+    db = new CasDB();
+  }
+
+  public void actionPerformed(ActionEvent arg0) {
+    if (arg0.getActionCommand().equals("About")) {
+      String aboutInfo = "OODT Catalog and Archive Server File Manger Browser.\n"
+          + "Copyright (c) 2007, California Institute of Technology.\n"
+          + "ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.";
+      JOptionPane.showMessageDialog(window, aboutInfo);
+    } else if (arg0.getActionCommand().equals("Query Language")) {
+      String aboutQueryLanguage = "The CAS File Manager Browser uses the Lucene Query Language.\n"
+          + "More Information can be found at:\n"
+          + "http://lucene.apache.org/java/docs/queryparsersyntax.html";
+      JOptionPane.showMessageDialog(window, aboutQueryLanguage);
+    } else if (arg0.getActionCommand().equals("Exit")) {
+      String exitWarning = "Are you sure you want to exit the CAS File Manager Browser?\n"
+          + "All unexported queries will be lost.";
+      int returnVal = JOptionPane.showConfirmDialog(window, exitWarning,
+          "Exit", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
+      if (returnVal == JOptionPane.OK_OPTION) {
+        System.exit(0);
+      }
+    } else if (arg0.getActionCommand().equals("Connect...")) {
+      // this is from the main menu
+      window.bar.changeConnectStatus();
+      prompt = new ConnectPrompt(this);
+      prompt.pack();
+      prompt.setVisible(true);
+    } else if (arg0.getActionCommand().equals("Disconnect")) {
+      String disconnectWarning = "Are you sure you want to disconnect from this File Manager?\n"
+          + "All unexported queries will be lost.";
+      int returnVal = JOptionPane.showConfirmDialog(window, disconnectWarning,
+          "Disconnect", JOptionPane.OK_CANCEL_OPTION,
+          JOptionPane.WARNING_MESSAGE);
+      if (returnVal == JOptionPane.OK_OPTION) {
+        window.bar.changeConnectStatus();
+        db.disconnect();
+        window.mPane.tPane.setBlank();
+        window.qPane.updateTypes(new String[] { "" });
+        window.bPane.changeStatus("Disconnected");
+      }
+    } else if (arg0.getActionCommand().equals("Cancel")) {
+      if (((JButton) arg0.getSource()).getName().equals("ConnectCancel")) {
+        prompt.dispose();
+        window.bar.changeConnectStatus();
+      } else if (((JButton) arg0.getSource()).getName().equals("SortCancel")) {
+        sort.dispose();
+      }
+    } else if (arg0.getActionCommand().equals("Connect")) {
+      // this is from the connect prompt
+      boolean connected = db.connect(prompt.getCASUrl());
+      if (connected) {
+        window.qPane.updateTypes(db.getAvailableTypes());
+        window.bPane.changeStatus("Connected to " + prompt.getCASUrl());
+      } else {
+        window.bar.changeConnectStatus();
+        String errorConnectingString = "Error Connecting to CAS File Manager at this following address:"
+            + prompt.getCASUrl();
+        JOptionPane.showMessageDialog(window, errorConnectingString, "Error",
+            JOptionPane.ERROR_MESSAGE);
+      }
+      prompt.dispose();
+    } else if (arg0.getActionCommand().equals("Sort")) {
+      sort = new SortPrompt(window, this);
+      sort.pack();
+      sort.setVisible(true);
+    } else if (arg0.getActionCommand().equals("Query Builder")) {
+      if (db.isConnected()) {
+        query = new QueryBuilderPrompt(db, this);
+        query.pack();
+        query.setVisible(true);
+      } else {
+        String errorQueryString = "You must connect to a CAS File Manager before using the Query Builder.";
+        JOptionPane.showMessageDialog(window, errorQueryString, "Disconnected",
+            JOptionPane.WARNING_MESSAGE);
+      }
+    } else if (arg0.getActionCommand().equals("OK")) {
+      window.mPane.tPane.sortRows(sort.getSortIndex(), sort.getSortType());
+      sort.dispose();
+    } else if (arg0.getActionCommand().equals("Search")) {
+      if (((JButton) arg0.getSource()).getName().equals("AdvancedQuery")) {
+        if (db.isConnected()) {
+          window.bPane.changeStatus("Querying the CAS...");
+          boolean result = db.issueQuery(query.getQuery(), query
+              .getProductType());
+          if (result) {
+            window.mPane.tPane.newTable(db.results.getData());
+            window.bPane.changeStatus("Query: " + query.getQueryString()
+                + " returned " + db.results.getNumRecords() + " records.");
+          } else {
+            window.mPane.tPane.setBlank();
+            window.bPane.changeStatus("Query failed.");
+            window.qPane.clearQuery();
+          }
+        }
+        query.dispose();
+      } else {
+        if (db.isConnected()) {
+          window.bPane.changeStatus("Querying the CAS...");
+          String query = window.qPane.getQuery();
+          boolean result = db.createQuery(query, window.qPane.getType());
+          if (result) {
+            window.mPane.tPane.newTable(db.results.getData());
+            window.bPane.changeStatus("Query: " + query + " returned "
+                + db.results.getNumRecords() + " records.");
+          } else {
+            window.mPane.tPane.setBlank();
+            window.bPane.changeStatus("Query failed.");
+            window.qPane.clearQuery();
+          }
+        }
+      }
+    } else if (arg0.getActionCommand().equals("Clear Query")) {
+      String clearWarning = "Are you sure you want to clear the current Query?\n"
+          + "All unexported queries will be lost.";
+      int returnVal = JOptionPane.showConfirmDialog(window, clearWarning,
+          "Clear", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
+      if (returnVal == JOptionPane.OK_OPTION) {
+        window.mPane.tPane.setBlank();
+        window.bPane.changeStatus("Query cleared.");
+      }
+    }
+  }
 
-	private MainWindow window;
-	private ConnectPrompt prompt;
-	private SortPrompt sort;
-	private QueryBuilderPrompt query;
-	
-	private CasDB db;
-	
-	public WindowListener(MainWindow m){
-		window = m;
-		db = new CasDB();
-	}
-	
-	public void actionPerformed(ActionEvent arg0) {
-		if(arg0.getActionCommand().equals("About")){
-			String aboutInfo = 
-				"OODT Catalog and Archive Server File Manger Browser.\n" +
-				"Copyright (c) 2007, California Institute of Technology.\n" +
-				"ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.";
-			JOptionPane.showMessageDialog(window,aboutInfo);
-		} else if(arg0.getActionCommand().equals("Query Language")){
-			String aboutQueryLanguage =
-				"The CAS File Manager Browser uses the Lucene Query Language.\n" +
-				"More Information can be found at:\n" +
-				"http://lucene.apache.org/java/docs/queryparsersyntax.html";
-			JOptionPane.showMessageDialog(window,aboutQueryLanguage);
-		} else if(arg0.getActionCommand().equals("Exit")){
-			String exitWarning = 
-				"Are you sure you want to exit the CAS File Manager Browser?\n"+
-				"All unexported queries will be lost.";
-			int returnVal = JOptionPane.showConfirmDialog(window, exitWarning, "Exit", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
-			if(returnVal == JOptionPane.OK_OPTION){
-				System.exit(0);
-			}
-		} else if(arg0.getActionCommand().equals("Connect...")){
-			//this is from the main menu
-			window.bar.changeConnectStatus();
-			prompt = new ConnectPrompt(this);
-			prompt.pack();
-            prompt.setVisible(true);
-		} else if(arg0.getActionCommand().equals("Disconnect")){
-			String disconnectWarning = 
-				"Are you sure you want to disconnect from this File Manager?\n"+
-				"All unexported queries will be lost.";
-			int returnVal = JOptionPane.showConfirmDialog(window, disconnectWarning, "Disconnect", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
-			if(returnVal == JOptionPane.OK_OPTION){
-				window.bar.changeConnectStatus();
-				db.disconnect();
-				window.mPane.tPane.setBlank();
-				window.qPane.updateTypes(new String[]{""});
-				window.bPane.changeStatus("Disconnected");
-			}
-		} else if(arg0.getActionCommand().equals("Cancel")){
-			if(((JButton)arg0.getSource()).getName().equals("ConnectCancel")){
-				prompt.dispose();
-				window.bar.changeConnectStatus();
-			} else if(((JButton)arg0.getSource()).getName().equals("SortCancel")){
-				sort.dispose();
-			}
-		} else if(arg0.getActionCommand().equals("Connect")){
-			//this is from the connect prompt
-			boolean connected = db.connect(prompt.getCASUrl());
-			if(connected){
-				window.qPane.updateTypes(db.getAvailableTypes());
-				window.bPane.changeStatus("Connected to "+prompt.getCASUrl());
-			} else {
-				window.bar.changeConnectStatus();
-				String errorConnectingString =
-					"Error Connecting to CAS File Manager at this following address:"+
-					prompt.getCASUrl();
-				JOptionPane.showMessageDialog(window, errorConnectingString, "Error", JOptionPane.ERROR_MESSAGE);
-			}
-			prompt.dispose();
-		} else if(arg0.getActionCommand().equals("Sort")){
-			sort = new SortPrompt(window, this);
-			sort.pack();
-			sort.setVisible(true);
-		} else if(arg0.getActionCommand().equals("Query Builder")){
-			if(db.isConnected()){
-				query = new QueryBuilderPrompt(db, this);
-				query.pack();
-				query.setVisible(true);
-			} else {
-				String errorQueryString =
-					"You must connect to a CAS File Manager before using the Query Builder.";
-				JOptionPane.showMessageDialog(window, errorQueryString, "Disconnected", JOptionPane.WARNING_MESSAGE);
-			}
-		} else if(arg0.getActionCommand().equals("OK")){
-			window.mPane.tPane.sortRows(sort.getSortIndex(),sort.getSortType());
-			sort.dispose();
-		} else if(arg0.getActionCommand().equals("Search")){
-			if(((JButton)arg0.getSource()).getName().equals("AdvancedQuery")){
-				if(db.isConnected()){
-					window.bPane.changeStatus("Querying the CAS...");
-					boolean result = db.issueQuery(query.getQuery(), query.getProductType());
-					if(result){
-						window.mPane.tPane.newTable(db.results.getData());
-						window.bPane.changeStatus("Query: "+query.getQueryString()+ " returned "+db.results.getNumRecords()+" records.");
-					} else {
-						window.mPane.tPane.setBlank();
-						window.bPane.changeStatus("Query failed.");
-						window.qPane.clearQuery();
-					}
-				}
-				query.dispose();
-			} else {
-				if(db.isConnected()){
-					window.bPane.changeStatus("Querying the CAS...");
-					String query = window.qPane.getQuery();
-					boolean result = db.createQuery(query, window.qPane.getType());
-					if(result){
-						window.mPane.tPane.newTable(db.results.getData());
-						window.bPane.changeStatus("Query: "+query+ " returned "+db.results.getNumRecords()+" records.");
-					} else {
-						window.mPane.tPane.setBlank();
-						window.bPane.changeStatus("Query failed.");
-						window.qPane.clearQuery();
-					}
-				}
-			}
-		} else if(arg0.getActionCommand().equals("Clear Query")){
-			String clearWarning = 
-				"Are you sure you want to clear the current Query?\n"+
-				"All unexported queries will be lost.";
-			int returnVal = JOptionPane.showConfirmDialog(window, clearWarning, "Clear", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
-			if(returnVal == JOptionPane.OK_OPTION){
-				window.mPane.tPane.setBlank();
-				window.bPane.changeStatus("Query cleared.");
-			}
-		}
-	}
-	
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.model;
 
 import org.apache.oodt.cas.filemgr.structs.Element;
@@ -36,174 +35,181 @@ import org.apache.lucene.analysis.standa
 import org.apache.lucene.queryParser.QueryParser;
 import org.apache.lucene.search.Query;
 
-public class CasDB{
-	
-	URL filemgrUrl;
-	XmlRpcFileManagerClient client;
-	public Results results;
-	
-	private static String freeTextBlock = "__FREE__";
-	
-	public CasDB(){
-		filemgrUrl = null;
-	}
-	
-	public boolean connect(String cas){
-		try {
-			filemgrUrl = new URL(cas);
-			client = new XmlRpcFileManagerClient(filemgrUrl);		
-		} catch (Exception e) {
-			filemgrUrl = null;
-			return false;
-		}
-		return true;
-	}
-	
-	public boolean disconnect(){
-		filemgrUrl=null;
-		return true;
-	}
-	
-	public boolean isConnected(){
-		if(filemgrUrl==null){
-			return false;
-		} else return true;
-	}
-	
-	public String[] getAvailableTypes(){
-		String [] types = null;
-		if(filemgrUrl != null){
-			try {
-				Vector<ProductType> v = (Vector<ProductType>)client.getProductTypes();
-				Vector<String> names = new Vector<String>();
-				types = new String[v.size()];
-
-				for(int i=0;i<v.size();i++)
-					names.add(v.get(i).getName());
-				
-				Collections.sort(names);
-				names.toArray(types);
-				
-			} catch (RepositoryManagerException e) {
-				//e.printStackTrace();
-			}
-			
-		} else {
-			types = new String[1];
-			types[0] = "";
-		}
-		
-		return types;
-	}
-	
-	public String[] getAvailableElements(String productTypeName){
-		String[] elements = null;
-		if(filemgrUrl!=null){
-			try {
-				ProductType pt = client.getProductTypeByName(productTypeName);
-				Vector<Element> v = (Vector<Element>) client.getElementsByProductType(pt);
-				Vector<String> names = new Vector<String>();
-				elements = new String[v.size()];
-				
-				for(int i=0;i<v.size();i++)
-					names.add(v.get(i).getElementName());
-				
-				Collections.sort(names);
-				names.toArray(elements);
-				
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		} else {
-			elements = new String[1];
-			elements[0] = "";
-		}
-		return elements;
-	}
-	
-	public String getElementID(String elementName){
-		String elementID = new String();
-		Element e;
-		try {
-			e = client.getElementByName(elementName);
-			elementID = e.getElementId();
-		} catch (ValidationLayerException e1) {}
-		return elementID;
-	}
-	
-	public boolean issueQuery(org.apache.oodt.cas.filemgr.structs.Query query, String productType){
-		results = new Results();
-		try{
-			ProductType type = client.getProductTypeByName(productType);
-			Vector<Product> products = (Vector<Product>) client.query(query, type);
-			int maxVal = 20;
-			if(products.size()<maxVal) maxVal = products.size();
-			for(int i=0;i<maxVal;i++){
-				Vector<Element> elements = (Vector<Element>) client.getElementsByProductType(type);
-				Metadata m = client.getMetadata(products.get(i));
-				Hashtable hash = m.getHashtable();
-				results.addProduct(m);
-			}
-		} catch (Exception e) {
-			return false;
-		}
-		
-		return true;
-	}
-	
-	
-	public boolean createQuery(String queryText, String productType){
-		
-		results = new Results();
-		if(queryText.trim().equals("*")){
-			ProductType type;
-			try {
-				type = client.getProductTypeByName(productType);
-				Vector<Product> products = (Vector<Product>) client.getProductsByProductType(type);
-				//for(int i=0;i<products.size();i++){
-				int maxVal = 20;
-				if(products.size()<maxVal) maxVal = products.size();
-				for(int i=0;i<maxVal;i++){
-					Vector<Element> elements = (Vector<Element>) client.getElementsByProductType(type);
-					Metadata m = client.getMetadata(products.get(i));
-					Hashtable hash = m.getHashtable();
-					results.addProduct(m);
-				}
-			} catch (Exception e) {
-				return false;
-			}
-			
-			
-		} else {
-		
-			QueryBuilder qb = new QueryBuilder(this);
-			org.apache.oodt.cas.filemgr.structs.Query  casQ = qb.ParseQuery(queryText);
-			ProductType type = null;
-			try {
-				type = client.getProductTypeByName(productType);
-				Vector<Product> products = (Vector<Product>)client.query(casQ, type);
-				int maxVal = 20;
-				if(products.size()<maxVal) maxVal = products.size();
-				for(int i=0;i<maxVal;i++){
-					Vector<Element> elements = (Vector<Element>) client.getElementsByProductType(type);
-					Metadata m = client.getMetadata(products.get(i));
-					Hashtable hash = m.getHashtable();
-					results.addProduct(m);
-				}
-			} catch (Exception e) {
-				return false;
-			}
-			
-			
-		
-		}
-		
-		return true;
-	}
-	
-	public boolean clearQuery(){
-		results = null;
-		return true;
-	}
-	
+public class CasDB {
+
+  URL filemgrUrl;
+  XmlRpcFileManagerClient client;
+  public Results results;
+
+  private static String freeTextBlock = "__FREE__";
+
+  public CasDB() {
+    filemgrUrl = null;
+  }
+
+  public boolean connect(String cas) {
+    try {
+      filemgrUrl = new URL(cas);
+      client = new XmlRpcFileManagerClient(filemgrUrl);
+    } catch (Exception e) {
+      filemgrUrl = null;
+      return false;
+    }
+    return true;
+  }
+
+  public boolean disconnect() {
+    filemgrUrl = null;
+    return true;
+  }
+
+  public boolean isConnected() {
+    if (filemgrUrl == null) {
+      return false;
+    } else
+      return true;
+  }
+
+  public String[] getAvailableTypes() {
+    String[] types = null;
+    if (filemgrUrl != null) {
+      try {
+        Vector<ProductType> v = (Vector<ProductType>) client.getProductTypes();
+        Vector<String> names = new Vector<String>();
+        types = new String[v.size()];
+
+        for (int i = 0; i < v.size(); i++)
+          names.add(v.get(i).getName());
+
+        Collections.sort(names);
+        names.toArray(types);
+
+      } catch (RepositoryManagerException e) {
+        // e.printStackTrace();
+      }
+
+    } else {
+      types = new String[1];
+      types[0] = "";
+    }
+
+    return types;
+  }
+
+  public String[] getAvailableElements(String productTypeName) {
+    String[] elements = null;
+    if (filemgrUrl != null) {
+      try {
+        ProductType pt = client.getProductTypeByName(productTypeName);
+        Vector<Element> v = (Vector<Element>) client
+            .getElementsByProductType(pt);
+        Vector<String> names = new Vector<String>();
+        elements = new String[v.size()];
+
+        for (int i = 0; i < v.size(); i++)
+          names.add(v.get(i).getElementName());
+
+        Collections.sort(names);
+        names.toArray(elements);
+
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    } else {
+      elements = new String[1];
+      elements[0] = "";
+    }
+    return elements;
+  }
+
+  public String getElementID(String elementName) {
+    String elementID = new String();
+    Element e;
+    try {
+      e = client.getElementByName(elementName);
+      elementID = e.getElementId();
+    } catch (ValidationLayerException e1) {
+    }
+    return elementID;
+  }
+
+  public boolean issueQuery(org.apache.oodt.cas.filemgr.structs.Query query,
+      String productType) {
+    results = new Results();
+    try {
+      ProductType type = client.getProductTypeByName(productType);
+      Vector<Product> products = (Vector<Product>) client.query(query, type);
+      int maxVal = 20;
+      if (products.size() < maxVal)
+        maxVal = products.size();
+      for (int i = 0; i < maxVal; i++) {
+        Vector<Element> elements = (Vector<Element>) client
+            .getElementsByProductType(type);
+        Metadata m = client.getMetadata(products.get(i));
+        Hashtable hash = m.getHashtable();
+        results.addProduct(m);
+      }
+    } catch (Exception e) {
+      return false;
+    }
+
+    return true;
+  }
+
+  public boolean createQuery(String queryText, String productType) {
+
+    results = new Results();
+    if (queryText.trim().equals("*")) {
+      ProductType type;
+      try {
+        type = client.getProductTypeByName(productType);
+        Vector<Product> products = (Vector<Product>) client
+            .getProductsByProductType(type);
+        // for(int i=0;i<products.size();i++){
+        int maxVal = 20;
+        if (products.size() < maxVal)
+          maxVal = products.size();
+        for (int i = 0; i < maxVal; i++) {
+          Vector<Element> elements = (Vector<Element>) client
+              .getElementsByProductType(type);
+          Metadata m = client.getMetadata(products.get(i));
+          Hashtable hash = m.getHashtable();
+          results.addProduct(m);
+        }
+      } catch (Exception e) {
+        return false;
+      }
+
+    } else {
+
+      QueryBuilder qb = new QueryBuilder(this);
+      org.apache.oodt.cas.filemgr.structs.Query casQ = qb.ParseQuery(queryText);
+      ProductType type = null;
+      try {
+        type = client.getProductTypeByName(productType);
+        Vector<Product> products = (Vector<Product>) client.query(casQ, type);
+        int maxVal = 20;
+        if (products.size() < maxVal)
+          maxVal = products.size();
+        for (int i = 0; i < maxVal; i++) {
+          Vector<Element> elements = (Vector<Element>) client
+              .getElementsByProductType(type);
+          Metadata m = client.getMetadata(products.get(i));
+          Hashtable hash = m.getHashtable();
+          results.addProduct(m);
+        }
+      } catch (Exception e) {
+        return false;
+      }
+
+    }
+
+    return true;
+  }
+
+  public boolean clearQuery() {
+    results = null;
+    return true;
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/QueryBuilder.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.model;
 
 import org.apache.lucene.analysis.standard.ParseException;
@@ -32,80 +31,82 @@ import org.apache.oodt.cas.filemgr.struc
 import org.apache.oodt.cas.filemgr.structs.TermQueryCriteria;
 import org.apache.oodt.cas.filemgr.tools.CASAnalyzer;
 
-public class QueryBuilder{
-	
-	private CasDB database;
-	
-	public QueryBuilder(CasDB db){
-		database = db;
-	}
-	
-	public Query ParseQuery(String query){
-		//note that "__FREE__" is a control work for free text searching
-		QueryParser parser = new QueryParser("__FREE__", new CASAnalyzer());
-		
-		org.apache.lucene.search.Query luceneQ = null;
-		org.apache.oodt.cas.filemgr.structs.Query casQ = 
-			new org.apache.oodt.cas.filemgr.structs.Query();
-		
-		
-		try {
-			luceneQ = parser.parse(query);
-		} catch (org.apache.lucene.queryParser.ParseException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-		System.out.println(luceneQ.toString());
-		GenerateCASQuery(casQ,luceneQ);
-		
-		return casQ;	
-	}
-	
-	public void GenerateCASQuery(org.apache.oodt.cas.filemgr.structs.Query casQ, org.apache.lucene.search.Query luceneQ){
-		if (luceneQ instanceof TermQuery){
-			Term t = ((TermQuery)luceneQ).getTerm();
-			if (t.field().equals("__FREE__")){
-				//if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new FreeTextQueryCriteria());
-				//((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t.text());
-			} else {
-				String element = database.getElementID(t.field());
-				if(!element.equals("")&&!t.text().equals("")){
-					
-					casQ.addCriterion(new TermQueryCriteria(element, t.text()));
-				}
-			}
-		} else if (luceneQ instanceof PhraseQuery){
-			Term[] t = ((PhraseQuery)luceneQ).getTerms();
-			if(t[0].field().equals("__FREE__")){
-				//if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new FreeTextQueryCriteria());
-				//for(int i=0;i<t.length;i++)
-				//	((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t[i].text());				
-			} else {
-				for(int i=0;i<t.length;i++){
-					String element = database.getElementID(t[i].field());
-					if(!element.equals("")&&!t[i].text().equals("")){
-						casQ.addCriterion(new TermQueryCriteria(element, t[i].text()));
-					}
-				}
-			}	
-		} else if (luceneQ instanceof RangeQuery){
-			Term startT = ((RangeQuery)luceneQ).getLowerTerm();
-			Term endT = ((RangeQuery)luceneQ).getUpperTerm();
-			String element = database.getElementID(startT.field());
-			if(!element.equals("")&&!startT.text().equals("")&&!endT.text().equals("")){
-				casQ.addCriterion(new RangeQueryCriteria(element, startT.text(), endT.text()));
-			}
-		} else if (luceneQ instanceof BooleanQuery){
-			BooleanClause[] clauses = ((BooleanQuery)luceneQ).getClauses();
-			for(int i=0;i<clauses.length;i++){
-				GenerateCASQuery(casQ, (clauses[i]).getQuery());
-			}
-		} else {
-			System.out.println("Error Parsing Query");
-			System.exit(-1);
-		}
-	}
-	
-	
+public class QueryBuilder {
+
+  private CasDB database;
+
+  public QueryBuilder(CasDB db) {
+    database = db;
+  }
+
+  public Query ParseQuery(String query) {
+    // note that "__FREE__" is a control work for free text searching
+    QueryParser parser = new QueryParser("__FREE__", new CASAnalyzer());
+
+    org.apache.lucene.search.Query luceneQ = null;
+    org.apache.oodt.cas.filemgr.structs.Query casQ = new org.apache.oodt.cas.filemgr.structs.Query();
+
+    try {
+      luceneQ = parser.parse(query);
+    } catch (org.apache.lucene.queryParser.ParseException e) {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
+
+    System.out.println(luceneQ.toString());
+    GenerateCASQuery(casQ, luceneQ);
+
+    return casQ;
+  }
+
+  public void GenerateCASQuery(org.apache.oodt.cas.filemgr.structs.Query casQ,
+      org.apache.lucene.search.Query luceneQ) {
+    if (luceneQ instanceof TermQuery) {
+      Term t = ((TermQuery) luceneQ).getTerm();
+      if (t.field().equals("__FREE__")) {
+        // if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new
+        // FreeTextQueryCriteria());
+        // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t.text());
+      } else {
+        String element = database.getElementID(t.field());
+        if (!element.equals("") && !t.text().equals("")) {
+
+          casQ.addCriterion(new TermQueryCriteria(element, t.text()));
+        }
+      }
+    } else if (luceneQ instanceof PhraseQuery) {
+      Term[] t = ((PhraseQuery) luceneQ).getTerms();
+      if (t[0].field().equals("__FREE__")) {
+        // if(casQuery.getCriteria().isEmpty()) casQuery.addCriterion(new
+        // FreeTextQueryCriteria());
+        // for(int i=0;i<t.length;i++)
+        // ((FreeTextQueryCriteria)casQuery.getCriteria().get(0)).addValue(t[i].text());
+      } else {
+        for (int i = 0; i < t.length; i++) {
+          String element = database.getElementID(t[i].field());
+          if (!element.equals("") && !t[i].text().equals("")) {
+            casQ.addCriterion(new TermQueryCriteria(element, t[i].text()));
+          }
+        }
+      }
+    } else if (luceneQ instanceof RangeQuery) {
+      Term startT = ((RangeQuery) luceneQ).getLowerTerm();
+      Term endT = ((RangeQuery) luceneQ).getUpperTerm();
+      String element = database.getElementID(startT.field());
+      if (!element.equals("") && !startT.text().equals("")
+          && !endT.text().equals("")) {
+        casQ.addCriterion(new RangeQueryCriteria(element, startT.text(), endT
+            .text()));
+      }
+    } else if (luceneQ instanceof BooleanQuery) {
+      BooleanClause[] clauses = ((BooleanQuery) luceneQ).getClauses();
+      for (int i = 0; i < clauses.length; i++) {
+        GenerateCASQuery(casQ, (clauses[i]).getQuery());
+      }
+    } else {
+      System.out.println("Error Parsing Query");
+      System.exit(-1);
+    }
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/Results.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/Results.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/Results.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/Results.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.model;
 
 import org.apache.oodt.cas.metadata.Metadata;
@@ -24,48 +23,46 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
 
+public class Results {
 
+  public Vector<Metadata> products;
 
-public class Results{
-	
-	public Vector<Metadata> products;
-	
-	public Results(){
-		products = new Vector<Metadata>();	
-	}
-	
-	public void addProduct(Metadata m){
-		products.add(m);
-	}
-	
-	public int getNumRecords(){
-		return products.size();
-	}
-	
-	public String[][] getData(){
-		
-		String[][] data = null;
-		if(products.size()>0){
-			data = new String[products.size()+1][];
-			
-			Hashtable hash = products.firstElement().getHashtable();
-			int numCols = hash.size();
-			data[0] = new String[numCols];
-			int i = 0;
-			for (Enumeration e = hash.keys(); e.hasMoreElements();) {
-			      data[0][i] = e.nextElement().toString();
-			      System.out.println(data[0][i]);
-			      i++;
-			}
-			
-			for(int j=0;j<products.size();j++){
-				data[j+1] = new String[i];
-				for(int k=0;k<i;k++){
-					data[j+1][k] = products.get(j).getMetadata(data[0][k]);
-				}
-			}
-			
-		}
-		return data;
-	}
+  public Results() {
+    products = new Vector<Metadata>();
+  }
+
+  public void addProduct(Metadata m) {
+    products.add(m);
+  }
+
+  public int getNumRecords() {
+    return products.size();
+  }
+
+  public String[][] getData() {
+
+    String[][] data = null;
+    if (products.size() > 0) {
+      data = new String[products.size() + 1][];
+
+      Hashtable hash = products.firstElement().getHashtable();
+      int numCols = hash.size();
+      data[0] = new String[numCols];
+      int i = 0;
+      for (Enumeration e = hash.keys(); e.hasMoreElements();) {
+        data[0][i] = e.nextElement().toString();
+        System.out.println(data[0][i]);
+        i++;
+      }
+
+      for (int j = 0; j < products.size(); j++) {
+        data[j + 1] = new String[i];
+        for (int k = 0; k < i; k++) {
+          data[j + 1][k] = products.get(j).getMetadata(data[0][k]);
+        }
+      }
+
+    }
+    return data;
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/system/XmlRpcFilemgrBrowser.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/system/XmlRpcFilemgrBrowser.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/system/XmlRpcFilemgrBrowser.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/system/XmlRpcFilemgrBrowser.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,22 +15,21 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.system;
 
 import org.apache.oodt.cas.filemgr.browser.view.MainWindow;
 
-public class XmlRpcFilemgrBrowser{
-	
-	private static MainWindow window;
-	
-	public static void main(String args[]){
-		javax.swing.SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-            	window = new MainWindow();
-                window.pack();
-                window.setVisible(true);
-            }
-        });
-	}
+public class XmlRpcFilemgrBrowser {
+
+  private static MainWindow window;
+
+  public static void main(String args[]) {
+    javax.swing.SwingUtilities.invokeLater(new Runnable() {
+      public void run() {
+        window = new MainWindow();
+        window.pack();
+        window.setVisible(true);
+      }
+    });
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/GuiParams.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/GuiParams.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/GuiParams.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/GuiParams.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,15 +15,14 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view;
 
-public class GuiParams{
-	
-	public static final int WINDOW_WIDTH = 600;
-	public static final int WINDOW_HEIGHT = 400;
-	
-	public static final int DEFAULT_CELL_WIDTH = 70;
-	public static final int DEFAULT_CELL_HEIGHT = 20;
-	
+public class GuiParams {
+
+  public static final int WINDOW_WIDTH = 600;
+  public static final int WINDOW_HEIGHT = 400;
+
+  public static final int DEFAULT_CELL_WIDTH = 70;
+  public static final int DEFAULT_CELL_HEIGHT = 20;
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/MainWindow.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/MainWindow.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/MainWindow.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/MainWindow.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view;
 
 import java.awt.BorderLayout;
@@ -42,45 +41,44 @@ import org.apache.oodt.cas.filemgr.brows
 import org.apache.oodt.cas.filemgr.browser.view.prompts.SortPrompt;
 import org.apache.oodt.cas.filemgr.browser.view.menus.MenuBar;
 
-public class MainWindow extends JFrame{ 
-	
-	public QueryPane qPane;
-	public MiddlePane mPane;
-	public BottomPane bPane;
-	public MenuBar bar;
-		
-	private WindowListener wListener;
-	
-	public MainWindow(){
-		wListener = new WindowListener(this);
-		//db = new CasDB();
-		setName("CAS File Manager Browser");
-		setDefaultCloseOperation(EXIT_ON_CLOSE);
-		qPane = new QueryPane(wListener);
-		mPane = new MiddlePane();
-		bPane = new BottomPane();
-		Dimension d = new Dimension(GuiParams.WINDOW_WIDTH,GuiParams.WINDOW_HEIGHT);
-		Container p = this.getContentPane();
-        p.setPreferredSize(d);
-        p.setMinimumSize(d);
-        p.setMaximumSize(d);
-		p.setBackground(Color.WHITE);
-		p.setLayout(new BorderLayout());
-		p.add(qPane,BorderLayout.NORTH);
-		p.add(mPane,BorderLayout.CENTER);
-		p.add(bPane,BorderLayout.SOUTH);
-        
-    
-        bar = new MenuBar(wListener, mPane.getListener());
-        this.setJMenuBar(bar);
-	}
-	
-	public String[] getColHeaders(){
-		HeaderRow h = mPane.tPane.getHeader();
-		String[] heading = new String[h.getNumCols()];
-		for(int i=0;i<h.getNumCols();i++){
-			heading[i] = h.getText(i);
-		}
-		return heading;
-	}
+public class MainWindow extends JFrame {
+
+  public QueryPane qPane;
+  public MiddlePane mPane;
+  public BottomPane bPane;
+  public MenuBar bar;
+
+  private WindowListener wListener;
+
+  public MainWindow() {
+    wListener = new WindowListener(this);
+    // db = new CasDB();
+    setName("CAS File Manager Browser");
+    setDefaultCloseOperation(EXIT_ON_CLOSE);
+    qPane = new QueryPane(wListener);
+    mPane = new MiddlePane();
+    bPane = new BottomPane();
+    Dimension d = new Dimension(GuiParams.WINDOW_WIDTH, GuiParams.WINDOW_HEIGHT);
+    Container p = this.getContentPane();
+    p.setPreferredSize(d);
+    p.setMinimumSize(d);
+    p.setMaximumSize(d);
+    p.setBackground(Color.WHITE);
+    p.setLayout(new BorderLayout());
+    p.add(qPane, BorderLayout.NORTH);
+    p.add(mPane, BorderLayout.CENTER);
+    p.add(bPane, BorderLayout.SOUTH);
+
+    bar = new MenuBar(wListener, mPane.getListener());
+    this.setJMenuBar(bar);
+  }
+
+  public String[] getColHeaders() {
+    HeaderRow h = mPane.tPane.getHeader();
+    String[] heading = new String[h.getNumCols()];
+    for (int i = 0; i < h.getNumCols(); i++) {
+      heading[i] = h.getText(i);
+    }
+    return heading;
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/MenuBar.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/MenuBar.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/MenuBar.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/MenuBar.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.menus;
 
 import java.awt.event.ActionEvent;
@@ -27,79 +26,77 @@ import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
 import javax.swing.KeyStroke;
 
-public class MenuBar extends JMenuBar{
-	
-	private JMenu fileMenu;
-	private JMenu queryMenu;
-	private JMenu helpMenu;
-	
-	private JMenuItem queryItem;
-	private JMenuItem aboutItem;
-	private JMenuItem clearItem;
-	private JMenuItem unhideItem;
-	private JMenuItem exportItem;
-	private JMenuItem exitItem;
-	private JMenuItem sortItem;
-	private JMenuItem advancedItem;
-	private JMenuItem connectItem;
-	
-	
-	public MenuBar(ActionListener windowListener, ActionListener tableListener){
-		fileMenu = new JMenu("File");
-		fileMenu.setMnemonic(KeyEvent.VK_F);
-		queryMenu = new JMenu("Query");
-		queryMenu.setMnemonic(KeyEvent.VK_Q);
-		helpMenu = new JMenu("Help");
-		
-		
-		//build help menu
-		queryItem = new JMenuItem("Query Language");
-		queryItem.addActionListener(windowListener);
-		aboutItem = new JMenuItem("About");
-		aboutItem.addActionListener(windowListener);
-		helpMenu.add(queryItem);
-		helpMenu.addSeparator();
-		helpMenu.add(aboutItem);
-		
-		//build query menu
-		clearItem = new JMenuItem("Clear Query");
-		clearItem.addActionListener(windowListener);
-		advancedItem = new JMenuItem("Query Builder");
-		advancedItem.addActionListener(windowListener);
-		sortItem = new JMenuItem("Sort");
-		sortItem.addActionListener(windowListener);
-		unhideItem = new JMenuItem("Unhide Columns");
-		unhideItem.addActionListener(tableListener);
-		queryMenu.add(unhideItem);
-		queryMenu.add(advancedItem);
-		queryMenu.add(sortItem);
-		queryMenu.addSeparator();
-		queryMenu.add(clearItem);
-		
-		//build file menu
-		connectItem = new JMenuItem("Connect...");
-		connectItem.addActionListener(windowListener);
-		exportItem = new JMenuItem("Export Table");
-		exportItem.addActionListener(tableListener);
-		exitItem = new JMenuItem("Exit");
-		exitItem.addActionListener(windowListener);
-		fileMenu.add(connectItem);
-		fileMenu.add(exportItem);
-		fileMenu.addSeparator();
-		fileMenu.add(exitItem);
-		
-		add(fileMenu);
-		add(queryMenu);
-		add(helpMenu);
-	}
-	
-	public void changeConnectStatus(){
-		if(connectItem.getActionCommand().equals("Connect...")){
-			connectItem.setActionCommand("Disconnect");
-			connectItem.setText("Disconnect");
-		} else {
-			connectItem.setActionCommand("Connect...");
-			connectItem.setText("Connect...");
-		}
-	}
+public class MenuBar extends JMenuBar {
+
+  private JMenu fileMenu;
+  private JMenu queryMenu;
+  private JMenu helpMenu;
+
+  private JMenuItem queryItem;
+  private JMenuItem aboutItem;
+  private JMenuItem clearItem;
+  private JMenuItem unhideItem;
+  private JMenuItem exportItem;
+  private JMenuItem exitItem;
+  private JMenuItem sortItem;
+  private JMenuItem advancedItem;
+  private JMenuItem connectItem;
+
+  public MenuBar(ActionListener windowListener, ActionListener tableListener) {
+    fileMenu = new JMenu("File");
+    fileMenu.setMnemonic(KeyEvent.VK_F);
+    queryMenu = new JMenu("Query");
+    queryMenu.setMnemonic(KeyEvent.VK_Q);
+    helpMenu = new JMenu("Help");
+
+    // build help menu
+    queryItem = new JMenuItem("Query Language");
+    queryItem.addActionListener(windowListener);
+    aboutItem = new JMenuItem("About");
+    aboutItem.addActionListener(windowListener);
+    helpMenu.add(queryItem);
+    helpMenu.addSeparator();
+    helpMenu.add(aboutItem);
+
+    // build query menu
+    clearItem = new JMenuItem("Clear Query");
+    clearItem.addActionListener(windowListener);
+    advancedItem = new JMenuItem("Query Builder");
+    advancedItem.addActionListener(windowListener);
+    sortItem = new JMenuItem("Sort");
+    sortItem.addActionListener(windowListener);
+    unhideItem = new JMenuItem("Unhide Columns");
+    unhideItem.addActionListener(tableListener);
+    queryMenu.add(unhideItem);
+    queryMenu.add(advancedItem);
+    queryMenu.add(sortItem);
+    queryMenu.addSeparator();
+    queryMenu.add(clearItem);
+
+    // build file menu
+    connectItem = new JMenuItem("Connect...");
+    connectItem.addActionListener(windowListener);
+    exportItem = new JMenuItem("Export Table");
+    exportItem.addActionListener(tableListener);
+    exitItem = new JMenuItem("Exit");
+    exitItem.addActionListener(windowListener);
+    fileMenu.add(connectItem);
+    fileMenu.add(exportItem);
+    fileMenu.addSeparator();
+    fileMenu.add(exitItem);
+
+    add(fileMenu);
+    add(queryMenu);
+    add(helpMenu);
+  }
+
+  public void changeConnectStatus() {
+    if (connectItem.getActionCommand().equals("Connect...")) {
+      connectItem.setActionCommand("Disconnect");
+      connectItem.setText("Disconnect");
+    } else {
+      connectItem.setActionCommand("Connect...");
+      connectItem.setText("Connect...");
+    }
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/RightClickMenu.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/RightClickMenu.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/RightClickMenu.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/menus/RightClickMenu.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.menus;
 
 import java.awt.event.ActionListener;
@@ -23,38 +22,38 @@ import java.awt.event.ActionListener;
 import javax.swing.JMenuItem;
 import javax.swing.JPopupMenu;
 
-public class RightClickMenu extends JPopupMenu{
-	
-	private JMenuItem hideItem;
-	private JMenuItem unhideItem;
-	//private JMenuItem resizeItem;
-	
-	
-	public RightClickMenu(ActionListener listener){
-		
-		hideItem = new JMenuItem("Hide");
-		hideItem.addActionListener(listener);
-		unhideItem = new JMenuItem("Unhide");
-		unhideItem.addActionListener(listener);
-		//resizeItem = new JMenuItem("Resize");
-		//resizeItem.addActionListener(listener);
-		
-		this.add(hideItem);
-		this.add(unhideItem);
-		//this.addSeparator();
-		//this.add(resizeItem);
-	}
-	
-	public void setUnhideMode(){
-		hideItem.setEnabled(false);
-		unhideItem.setEnabled(true);
-		//resizeItem.setEnabled(false);
-	}
-	
-	public void setHideMode(){
-		hideItem.setEnabled(true);
-		unhideItem.setEnabled(false);
-		//resizeItem.setEnabled(true);
-	}
-	
+public class RightClickMenu extends JPopupMenu {
+
+  private JMenuItem hideItem;
+  private JMenuItem unhideItem;
+
+  // private JMenuItem resizeItem;
+
+  public RightClickMenu(ActionListener listener) {
+
+    hideItem = new JMenuItem("Hide");
+    hideItem.addActionListener(listener);
+    unhideItem = new JMenuItem("Unhide");
+    unhideItem.addActionListener(listener);
+    // resizeItem = new JMenuItem("Resize");
+    // resizeItem.addActionListener(listener);
+
+    this.add(hideItem);
+    this.add(unhideItem);
+    // this.addSeparator();
+    // this.add(resizeItem);
+  }
+
+  public void setUnhideMode() {
+    hideItem.setEnabled(false);
+    unhideItem.setEnabled(true);
+    // resizeItem.setEnabled(false);
+  }
+
+  public void setHideMode() {
+    hideItem.setEnabled(true);
+    unhideItem.setEnabled(false);
+    // resizeItem.setEnabled(true);
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/BottomPane.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/BottomPane.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/BottomPane.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/BottomPane.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.Color;
@@ -29,38 +28,38 @@ import javax.swing.border.CompoundBorder
 import javax.swing.border.EmptyBorder;
 import javax.swing.border.LineBorder;
 
-public class BottomPane extends JPanel{
-	
-	public JLabel statusMessage; 
-	
-	public BottomPane(){
-		
-		//set background and panel size
-		setBackground(Color.WHITE);
-		EmptyBorder line1 = new EmptyBorder(4,10,4,2);
-		LineBorder line2 = new LineBorder(Color.BLACK,1);
-		EmptyBorder line3 = new EmptyBorder(4,10,4,10);
-		CompoundBorder cb1 = new CompoundBorder(line1,line2);
-		CompoundBorder cb2 = new CompoundBorder(cb1,line3);
-		setBorder(cb2);
-		
-		JLabel statusLabel = new JLabel(" Status: ");
-		statusLabel.setFont(new Font("san-serif",Font.PLAIN,10));
-		
-		statusMessage = new JLabel(" Disconnected");
-		statusMessage.setFont(new Font("san-serif",Font.PLAIN,10));
-		statusMessage.setForeground(Color.RED);
-		statusMessage.setBackground(Color.WHITE);
-		
-		//set layout
-		setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS));
-		add(statusLabel);
-		add(statusMessage);
-	}
-	
-	public void changeStatus(String status){
-		statusMessage.setText(status);
-		this.repaint();
-	}
-	
+public class BottomPane extends JPanel {
+
+  public JLabel statusMessage;
+
+  public BottomPane() {
+
+    // set background and panel size
+    setBackground(Color.WHITE);
+    EmptyBorder line1 = new EmptyBorder(4, 10, 4, 2);
+    LineBorder line2 = new LineBorder(Color.BLACK, 1);
+    EmptyBorder line3 = new EmptyBorder(4, 10, 4, 10);
+    CompoundBorder cb1 = new CompoundBorder(line1, line2);
+    CompoundBorder cb2 = new CompoundBorder(cb1, line3);
+    setBorder(cb2);
+
+    JLabel statusLabel = new JLabel(" Status: ");
+    statusLabel.setFont(new Font("san-serif", Font.PLAIN, 10));
+
+    statusMessage = new JLabel(" Disconnected");
+    statusMessage.setFont(new Font("san-serif", Font.PLAIN, 10));
+    statusMessage.setForeground(Color.RED);
+    statusMessage.setBackground(Color.WHITE);
+
+    // set layout
+    setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
+    add(statusLabel);
+    add(statusMessage);
+  }
+
+  public void changeStatus(String status) {
+    statusMessage.setText(status);
+    this.repaint();
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Cell.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Cell.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Cell.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/Cell.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.BorderLayout;
@@ -29,45 +28,46 @@ import javax.swing.border.LineBorder;
 
 import org.apache.oodt.cas.filemgr.browser.view.GuiParams;
 
-public class Cell extends JPanel{
-	
-	protected JLabel text;
-	
-	public Cell(){
-		setLayout(new BorderLayout());
-		setBackground(Color.WHITE);
-		setForeground(Color.BLACK);
-		Dimension size = new Dimension(GuiParams.DEFAULT_CELL_WIDTH,GuiParams.DEFAULT_CELL_HEIGHT);
-		setMinimumSize(size);
-		setMaximumSize(size);
-		setPreferredSize(size);
-		setBorder(new LineBorder(Color.LIGHT_GRAY,1));	
-		
-		text = new JLabel("");
-		Font f = new Font("san-sarif", Font.PLAIN, 10);
-		text.setFont(f);
-		this.add(text,BorderLayout.CENTER);
-	}
-	
-	public void setText(String newText){
-		text.setText(newText);
-	}
-	
-	public String getText(){
-		return text.getText();
-	}
-	
-	public void setWidth(int newWidth){
-		Dimension size = this.getSize();
-		size.width = newWidth;
-		this.setSize(size);
-		text.setSize(size);
-	}
-	
-	public void setHeight(int newHeight){
-		Dimension size = this.getSize();
-		size.height = newHeight;
-		this.setSize(size);
-		text.setSize(size);
-	}
+public class Cell extends JPanel {
+
+  protected JLabel text;
+
+  public Cell() {
+    setLayout(new BorderLayout());
+    setBackground(Color.WHITE);
+    setForeground(Color.BLACK);
+    Dimension size = new Dimension(GuiParams.DEFAULT_CELL_WIDTH,
+        GuiParams.DEFAULT_CELL_HEIGHT);
+    setMinimumSize(size);
+    setMaximumSize(size);
+    setPreferredSize(size);
+    setBorder(new LineBorder(Color.LIGHT_GRAY, 1));
+
+    text = new JLabel("");
+    Font f = new Font("san-sarif", Font.PLAIN, 10);
+    text.setFont(f);
+    this.add(text, BorderLayout.CENTER);
+  }
+
+  public void setText(String newText) {
+    text.setText(newText);
+  }
+
+  public String getText() {
+    return text.getText();
+  }
+
+  public void setWidth(int newWidth) {
+    Dimension size = this.getSize();
+    size.width = newWidth;
+    this.setSize(size);
+    text.setSize(size);
+  }
+
+  public void setHeight(int newHeight) {
+    Dimension size = this.getSize();
+    size.height = newHeight;
+    this.setSize(size);
+    text.setSize(size);
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderCell.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderCell.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderCell.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderCell.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.Color;
@@ -27,28 +26,28 @@ import javax.swing.border.LineBorder;
 
 import org.apache.oodt.cas.filemgr.browser.view.GuiParams;
 
-public class HeaderCell extends Cell{
-	
-	private int colNum;
-	
-	public HeaderCell(MouseListener listener, int colNum){
-		super();
-		this.setBackground(Color.LIGHT_GRAY);
-		this.setBorder(null);
-		Dimension size = new Dimension(GuiParams.DEFAULT_CELL_WIDTH -2,GuiParams.DEFAULT_CELL_HEIGHT);
-		setMinimumSize(size);
-		setMaximumSize(size);
-		setPreferredSize(size);
-		Font f = new Font("san-serif",Font.BOLD,11);
-		text.setFont(f);
-		
-		this.colNum = colNum;
-		this.addMouseListener(listener);
-	}
-	
-	public int getColNum(){
-		return colNum;
-	}
+public class HeaderCell extends Cell {
+
+  private int colNum;
+
+  public HeaderCell(MouseListener listener, int colNum) {
+    super();
+    this.setBackground(Color.LIGHT_GRAY);
+    this.setBorder(null);
+    Dimension size = new Dimension(GuiParams.DEFAULT_CELL_WIDTH - 2,
+        GuiParams.DEFAULT_CELL_HEIGHT);
+    setMinimumSize(size);
+    setMaximumSize(size);
+    setPreferredSize(size);
+    Font f = new Font("san-serif", Font.BOLD, 11);
+    text.setFont(f);
+
+    this.colNum = colNum;
+    this.addMouseListener(listener);
+  }
+
+  public int getColNum() {
+    return colNum;
+  }
 
-	
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderRow.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderRow.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderRow.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderRow.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.Color;
@@ -24,76 +23,77 @@ import java.awt.event.MouseListener;
 import javax.swing.BoxLayout;
 import javax.swing.JPanel;
 
-public class HeaderRow extends JPanel{
-	
-	private HeaderCell cells[];
-	private int numCells;
-	
-	public HeaderRow(MouseListener listener, int numCells){
-//		create cells
-		this.numCells = numCells;
-		cells = new HeaderCell[numCells];
-		for(int i=0;i<numCells;i++){
-			cells[i] = new HeaderCell(listener,i);
-		}
-		
-		//set background, etc.
-		this.setBackground(Color.WHITE);
-		this.setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS));
-		
-		for(int i=0;i<numCells;i++){
-			this.add(cells[i]);
-			this.add(new HeaderSpacer(listener,i));
-		}
-	}
-		
-	public int getNumCols(){
-		return numCells;
-	}
-	
-	public void hideCol(int colNum){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		c.setVisible(false);
-		HeaderSpacer sp = (HeaderSpacer)this.getComponent(trueNum+1);
-		sp.setVisible(false);
-	}
-		
-	public void unhideCol(int colNum){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		c.setVisible(true);
-		HeaderSpacer sp = (HeaderSpacer)this.getComponent(trueNum+1);
-		sp.setVisible(true);
-	}
-		
-	public void setText(int colNum, String text){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		c.setText(text);
-		c.repaint();
-	}
-	
-	public String getText(int colNum){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		return c.getText();
-	}
-	
-	public int getWidth(int colNum){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		return c.getWidth();
-	}
-	
-	public void changeWidth(int colNum, int newWidth){
-		int trueNum = colNum*2;
-		HeaderCell c = (HeaderCell)this.getComponent(trueNum);
-		int change = c.getWidth() - newWidth;
-		c.setWidth(newWidth);
-		for(int i=trueNum+1;i<this.getComponentCount();i++){
-			this.getComponent(i).setLocation(this.getComponent(i).getX()-change, this.getComponent(i).getY());
-		}
-		this.repaint();
-	}
+public class HeaderRow extends JPanel {
+
+  private HeaderCell cells[];
+  private int numCells;
+
+  public HeaderRow(MouseListener listener, int numCells) {
+    // create cells
+    this.numCells = numCells;
+    cells = new HeaderCell[numCells];
+    for (int i = 0; i < numCells; i++) {
+      cells[i] = new HeaderCell(listener, i);
+    }
+
+    // set background, etc.
+    this.setBackground(Color.WHITE);
+    this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
+
+    for (int i = 0; i < numCells; i++) {
+      this.add(cells[i]);
+      this.add(new HeaderSpacer(listener, i));
+    }
+  }
+
+  public int getNumCols() {
+    return numCells;
+  }
+
+  public void hideCol(int colNum) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    c.setVisible(false);
+    HeaderSpacer sp = (HeaderSpacer) this.getComponent(trueNum + 1);
+    sp.setVisible(false);
+  }
+
+  public void unhideCol(int colNum) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    c.setVisible(true);
+    HeaderSpacer sp = (HeaderSpacer) this.getComponent(trueNum + 1);
+    sp.setVisible(true);
+  }
+
+  public void setText(int colNum, String text) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    c.setText(text);
+    c.repaint();
+  }
+
+  public String getText(int colNum) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    return c.getText();
+  }
+
+  public int getWidth(int colNum) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    return c.getWidth();
+  }
+
+  public void changeWidth(int colNum, int newWidth) {
+    int trueNum = colNum * 2;
+    HeaderCell c = (HeaderCell) this.getComponent(trueNum);
+    int change = c.getWidth() - newWidth;
+    c.setWidth(newWidth);
+    for (int i = trueNum + 1; i < this.getComponentCount(); i++) {
+      this.getComponent(i).setLocation(this.getComponent(i).getX() - change,
+          this.getComponent(i).getY());
+    }
+    this.repaint();
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderSpacer.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderSpacer.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderSpacer.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/HeaderSpacer.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.Color;
@@ -26,24 +25,24 @@ import javax.swing.JPanel;
 
 import org.apache.oodt.cas.filemgr.browser.view.GuiParams;
 
-public class HeaderSpacer extends JPanel{
-	
-	private int col;
-	
-	public HeaderSpacer(MouseListener listener,int pos){
-		//set background, size
-		this.setBackground(Color.WHITE);
-		Dimension d = new Dimension(2,GuiParams.DEFAULT_CELL_HEIGHT);
-		this.setMinimumSize(d);
-		this.setMaximumSize(d);
-		this.setPreferredSize(d);
-		
-		col = pos;
-		this.addMouseListener(listener);
-	}
-	
-	public int getColNum(){
-		return col;
-	}
-	
+public class HeaderSpacer extends JPanel {
+
+  private int col;
+
+  public HeaderSpacer(MouseListener listener, int pos) {
+    // set background, size
+    this.setBackground(Color.WHITE);
+    Dimension d = new Dimension(2, GuiParams.DEFAULT_CELL_HEIGHT);
+    this.setMinimumSize(d);
+    this.setMaximumSize(d);
+    this.setPreferredSize(d);
+
+    col = pos;
+    this.addMouseListener(listener);
+  }
+
+  public int getColNum() {
+    return col;
+  }
+
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/MiddlePane.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/MiddlePane.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/MiddlePane.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/MiddlePane.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.BorderLayout;
@@ -28,26 +27,26 @@ import org.apache.oodt.cas.filemgr.brows
 
 public class MiddlePane extends JPanel {
 
-	public TablePane tPane;
-	
-	public MiddlePane(){
-		this.setBackground(Color.WHITE);
-		this.setLayout(new BorderLayout());
-		
-		tPane = new TablePane();
-        
-		JPanel inset = new JPanel();
-		inset.setBackground(Color.WHITE);
-		inset.setLayout(new BorderLayout());
-		inset.add(tPane, BorderLayout.WEST);
-		
-        JScrollPane scrollPane=new JScrollPane(inset);
-        
-        this.add(scrollPane, BorderLayout.CENTER);
-	}
-	
-	public TableListener getListener(){
-		return tPane.getListener();
-	}
+  public TablePane tPane;
+
+  public MiddlePane() {
+    this.setBackground(Color.WHITE);
+    this.setLayout(new BorderLayout());
+
+    tPane = new TablePane();
+
+    JPanel inset = new JPanel();
+    inset.setBackground(Color.WHITE);
+    inset.setLayout(new BorderLayout());
+    inset.add(tPane, BorderLayout.WEST);
+
+    JScrollPane scrollPane = new JScrollPane(inset);
+
+    this.add(scrollPane, BorderLayout.CENTER);
+  }
+
+  public TableListener getListener() {
+    return tPane.getListener();
+  }
 
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryField.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryField.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryField.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryField.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.BorderLayout;
@@ -36,75 +35,75 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
 
-public class QueryField extends JPanel implements ActionListener{
+public class QueryField extends JPanel implements ActionListener {
 
-	private JTextField text;
-	private JButton button;
-	private JComboBox types;
-	
-	public QueryField(ActionListener listener){
-	
-		//setbackground an size for panel
-		setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS));
-		setBackground(Color.WHITE);
-		setMinimumSize(new Dimension(500,50));
-		setPreferredSize(new Dimension(500,50));
-	
-		text = new JTextField(30);
-		button = new JButton("Search");
-		String[] blankType = {""};
-		types = new JComboBox(blankType);
-		
-		//set background and size for textbox and combo
-		text.setForeground(Color.BLACK);
-		text.setBackground(Color.WHITE);
-		text.setMinimumSize(new Dimension(100,25));
-		text.setPreferredSize(new Dimension(100,25));
-		text.setMaximumSize(new Dimension(100,25));
-		text.addActionListener(this);
-		Dimension typeDim = new Dimension(100,25);
-		types.setMaximumSize(typeDim);
-		types.setMinimumSize(typeDim);
-		types.setPreferredSize(typeDim);
-		types.setBackground(Color.WHITE);
-		
-		//set button
-		button.setBackground(Color.WHITE);
-		button.addActionListener(listener);
-		button.setName("Query");
-		
-		add(new JLabel("ProductType:  "));
-		add(types);
-		add(new JLabel("    Query:  "));
-		add(text);
-		add(button);
-	}
-	
-	public String getQueryString(){
-		return text.getText();
-	}
-	
-	public void clearQuery(){
-		text.setText("");
-	}
-	
-	public String getProductType(){
-		return types.getSelectedItem().toString();
-	}
-	
-	public void updateTypes(String[] typeNames){
-		this.remove(types);
-		types = new JComboBox(typeNames);
-		types.setBackground(Color.WHITE);
-		Dimension typeDim = new Dimension(100,25);
-		types.setMaximumSize(typeDim);
-		types.setMinimumSize(typeDim);
-		types.setPreferredSize(typeDim);
-		add(types,1);
-		this.repaint();
-	}
-
-	public void actionPerformed(ActionEvent arg0) {
-		button.doClick();
-	}
+  private JTextField text;
+  private JButton button;
+  private JComboBox types;
+
+  public QueryField(ActionListener listener) {
+
+    // setbackground an size for panel
+    setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
+    setBackground(Color.WHITE);
+    setMinimumSize(new Dimension(500, 50));
+    setPreferredSize(new Dimension(500, 50));
+
+    text = new JTextField(30);
+    button = new JButton("Search");
+    String[] blankType = { "" };
+    types = new JComboBox(blankType);
+
+    // set background and size for textbox and combo
+    text.setForeground(Color.BLACK);
+    text.setBackground(Color.WHITE);
+    text.setMinimumSize(new Dimension(100, 25));
+    text.setPreferredSize(new Dimension(100, 25));
+    text.setMaximumSize(new Dimension(100, 25));
+    text.addActionListener(this);
+    Dimension typeDim = new Dimension(100, 25);
+    types.setMaximumSize(typeDim);
+    types.setMinimumSize(typeDim);
+    types.setPreferredSize(typeDim);
+    types.setBackground(Color.WHITE);
+
+    // set button
+    button.setBackground(Color.WHITE);
+    button.addActionListener(listener);
+    button.setName("Query");
+
+    add(new JLabel("ProductType:  "));
+    add(types);
+    add(new JLabel("    Query:  "));
+    add(text);
+    add(button);
+  }
+
+  public String getQueryString() {
+    return text.getText();
+  }
+
+  public void clearQuery() {
+    text.setText("");
+  }
+
+  public String getProductType() {
+    return types.getSelectedItem().toString();
+  }
+
+  public void updateTypes(String[] typeNames) {
+    this.remove(types);
+    types = new JComboBox(typeNames);
+    types.setBackground(Color.WHITE);
+    Dimension typeDim = new Dimension(100, 25);
+    types.setMaximumSize(typeDim);
+    types.setMinimumSize(typeDim);
+    types.setPreferredSize(typeDim);
+    add(types, 1);
+    this.repaint();
+  }
+
+  public void actionPerformed(ActionEvent arg0) {
+    button.doClick();
+  }
 }

Modified: incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryPane.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryPane.java?rev=963384&r1=963383&r2=963384&view=diff
==============================================================================
--- incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryPane.java (original)
+++ incubator/oodt/trunk/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/panels/QueryPane.java Mon Jul 12 17:40:21 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.filemgr.browser.view.panels;
 
 import java.awt.BorderLayout;
@@ -31,43 +30,43 @@ import javax.swing.border.LineBorder;
 
 import org.apache.oodt.cas.filemgr.browser.view.GuiParams;
 
-public class QueryPane extends JPanel{
-	
-	private QueryField field;
-	
-	public QueryPane(ActionListener listener){
-		super(new BorderLayout());
-		
-		//set background and panel size
-		setBackground(Color.WHITE);
-		Dimension paneSize = new Dimension();
-		paneSize.width= GuiParams.WINDOW_WIDTH;
-		paneSize.height = (int)(GuiParams.WINDOW_HEIGHT*(0.1));
-		
-		//set border
-		EmptyBorder line1 = new EmptyBorder(2,10,2,2);
-		LineBorder line2 = new LineBorder(Color.BLACK,1);
-		CompoundBorder cp = new CompoundBorder(line1,line2);
-		this.setBorder(cp);
-		
-		//add query field to pane
-		field = new QueryField(listener);
-		add(field,BorderLayout.EAST);
-	}
-	
-	public String getQuery(){
-		return field.getQueryString();
-	}
-	
-	public void clearQuery(){
-		field.clearQuery();
-	}
-	
-	public String getType(){
-		return field.getProductType();
-	}
-	
-	public void updateTypes(String[] types){
-		field.updateTypes(types);
-	}
+public class QueryPane extends JPanel {
+
+  private QueryField field;
+
+  public QueryPane(ActionListener listener) {
+    super(new BorderLayout());
+
+    // set background and panel size
+    setBackground(Color.WHITE);
+    Dimension paneSize = new Dimension();
+    paneSize.width = GuiParams.WINDOW_WIDTH;
+    paneSize.height = (int) (GuiParams.WINDOW_HEIGHT * (0.1));
+
+    // set border
+    EmptyBorder line1 = new EmptyBorder(2, 10, 2, 2);
+    LineBorder line2 = new LineBorder(Color.BLACK, 1);
+    CompoundBorder cp = new CompoundBorder(line1, line2);
+    this.setBorder(cp);
+
+    // add query field to pane
+    field = new QueryField(listener);
+    add(field, BorderLayout.EAST);
+  }
+
+  public String getQuery() {
+    return field.getQueryString();
+  }
+
+  public void clearQuery() {
+    field.clearQuery();
+  }
+
+  public String getType() {
+    return field.getProductType();
+  }
+
+  public void updateTypes(String[] types) {
+    field.updateTypes(types);
+  }
 }



Mime
View raw message