Author: mmichaud
Date: 2009-04-02 08:21:40 -0700 (Thu, 02 Apr 2009)
New Revision: 16430

Removed:
   
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myButton.java
   
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myFile.java
   
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myURL.java
Modified:
   
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/IntegerHandler.java
   
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/StringHandler.java
Log:


Modified: 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/IntegerHandler.java
===================================================================
--- 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/IntegerHandler.java
 2009-04-02 15:21:18 UTC (rev 16429)
+++ 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/IntegerHandler.java
 2009-04-02 15:21:40 UTC (rev 16430)
@@ -8,6 +8,7 @@
 
 import org.cytoscape.work.AbstractGuiHandler;
 import org.cytoscape.work.Tunable;
+import org.cytoscape.work.Tunable.Param;
 
 
 public class IntegerHandler extends AbstractGuiHandler {
@@ -16,8 +17,8 @@
        Double value = null;
        Integer myInteger;
        String newline = System.getProperty("line.separator");
+       boolean horizontal=false;
 
-
        public IntegerHandler(Field f, Object o, Tunable t) {
                super(f,o,t);
                try{
@@ -25,15 +26,23 @@
                }catch(Exception e){e.printStackTrace();}
                
                panel = new JPanel(new BorderLayout());
+               for(Param par : 
t.alignment())if(par==Param.horizontal)horizontal=true; 
                JLabel label = new JLabel(t.description());
                label.setFont(new Font(null, Font.PLAIN,12));
-               panel.add(label,BorderLayout.WEST );
+
                try {
                        jtf = new JTextField(f.get(o).toString(), 10);
                        //jtf.addActionListener( this );
-                       jtf.setHorizontalAlignment(JTextField.RIGHT);
+               } catch (Exception e) { e.printStackTrace(); }
+               jtf.setHorizontalAlignment(JTextField.RIGHT);
+               if(horizontal==false){
+                       panel.add(label,BorderLayout.WEST);
                        panel.add(jtf,BorderLayout.EAST);
-               } catch (Exception e) { e.printStackTrace(); }
+               }
+               else{
+                       panel.add(label,BorderLayout.NORTH);
+                       panel.add(jtf,BorderLayout.SOUTH);
+               }
                        
        }
 

Modified: 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/StringHandler.java
===================================================================
--- 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/StringHandler.java
  2009-04-02 15:21:18 UTC (rev 16429)
+++ 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/internal/gui/StringHandler.java
  2009-04-02 15:21:40 UTC (rev 16430)
@@ -8,26 +8,35 @@
 
 import org.cytoscape.work.AbstractGuiHandler;
 import org.cytoscape.work.Tunable;
+import org.cytoscape.work.Tunable.Param;
 
 
 public class StringHandler extends AbstractGuiHandler {
 
        JTextField jtf;
-
+       boolean horizontal = false;
+       
        public StringHandler(Field f, Object o, Tunable t) {
                super(f,o,t);
 
+               for(Param par : t.alignment())if(par==Param.horizontal) 
horizontal = true;
+
                panel = new JPanel(new BorderLayout());
+               JLabel label = new JLabel(t.description());
+               label.setFont(new Font(null, Font.PLAIN,12));
                try {
-                       JLabel label = new JLabel(t.description());
-                       label.setFont(new Font(null, Font.PLAIN,12));
-                       panel.add(label,BorderLayout.WEST );
                        jtf = new JTextField( (String)f.get(o), 15);
-                       jtf.setHorizontalAlignment(JTextField.RIGHT);
-                       //jtf.addActionListener(this);
+               }catch (Exception e) {e.printStackTrace(); }
+               jtf.setHorizontalAlignment(JTextField.RIGHT);
+
+               if(horizontal==false){
+                       panel.add(label,BorderLayout.WEST);
                        panel.add(jtf,BorderLayout.EAST);
-               } catch (Exception e) {e.printStackTrace(); }
-                       
+               }
+               else {
+                       panel.add(label,BorderLayout.NORTH);
+                       panel.add(jtf,BorderLayout.SOUTH);
+               }
        }
 
        public void handle() {

Deleted: 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myButton.java
===================================================================
--- 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myButton.java
       2009-04-02 15:21:18 UTC (rev 16429)
+++ 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myButton.java
       2009-04-02 15:21:40 UTC (rev 16430)
@@ -1,20 +0,0 @@
-package org.cytoscape.work.util;
-
-import javax.swing.JButton;
-
-
-...@suppresswarnings("serial")
-public class myButton extends JButton{
-
-       private Boolean selected;
-       
-       public void setselected(Boolean value){
-               selected = value;
-       }
-       
-       public Boolean getselected(){
-               return selected;
-       }
-       
-       
-}
\ No newline at end of file

Deleted: 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myFile.java
===================================================================
--- 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myFile.java
 2009-04-02 15:21:18 UTC (rev 16429)
+++ 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myFile.java
 2009-04-02 15:21:40 UTC (rev 16430)
@@ -1,63 +0,0 @@
-package org.cytoscape.work.util;
-
-import java.io.File;
-import java.util.List;
-
-
-public class myFile{
-       
-       File file;
-       File[] files;
-       boolean modal;
-       java.util.List<String> paths;
-       String path;
-
-       
-       
-       public myFile(File file){
-               this.modal = modal;
-               this.file = file;
-       }
-       
-       public myFile(File[] files){
-               this.modal = modal;
-               this.files = files;
-       }
-       
-       public List<String> getPaths() {
-               return paths;
-       }
-
-       public void setPath(String inpath){
-               path = inpath;
-       }
-       public void setPaths(List<String> path){
-               paths = path;
-       }
-       
-       
-       public void setFiles(File[] infiles){
-               files = infiles;
-       }
-       
-       public String getPath(){
-               return file.getAbsolutePath();
-       }
-       
-       public File[] getFiles(){
-               return files;
-       }
-       
-       
-       public void setFile(File infile){
-               file = infile;
-       }
-       
-       public File getFile(){
-               return file;
-       }
-
-       public boolean getModal(){
-               return modal;
-       }
-}
\ No newline at end of file

Deleted: 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myURL.java
===================================================================
--- 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myURL.java
  2009-04-02 15:21:18 UTC (rev 16429)
+++ 
csplugins/trunk/pasteur/mathieu/tunables2/src/main/java/org/cytoscape/work/util/myURL.java
  2009-04-02 15:21:40 UTC (rev 16430)
@@ -1,18 +0,0 @@
-package org.cytoscape.work.util;
-
-public class myURL{
-       String url;
-       
-       public myURL(String url){
-               this.url = url;
-       }
-       
-       public String getURL(){
-               return url;
-       }
-       
-       public void setURL(String newURL){
-               url = newURL;
-       }
-       
-}
\ No newline at end of file


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to