gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] fenfire ./TODO-loom org/fenfire/loom/Loom.java


From: Benja Fallenstein
Subject: [Gzz-commits] fenfire ./TODO-loom org/fenfire/loom/Loom.java
Date: Wed, 12 Mar 2003 13:59:16 -0500

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Changes by:     Benja Fallenstein <address@hidden>      03/03/12 13:59:16

Modified files:
        .              : TODO-loom 
        org/fenfire/loom: Loom.java 

Log message:
        Make 'goto URI' feature right (don't open a goto dialog
        immediately when loom is started)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/TODO-loom.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/loom/Loom.java.diff?tr1=1.28&tr2=1.29&r1=text&r2=text

Patches:
Index: fenfire/TODO-loom
diff -u fenfire/TODO-loom:1.34 fenfire/TODO-loom:1.35
--- fenfire/TODO-loom:1.34      Wed Mar 12 04:16:35 2003
+++ fenfire/TODO-loom   Wed Mar 12 13:59:16 2003
@@ -15,8 +15,6 @@
     - fix bug: any event on the AWT thread does not
       refresh the screen, even if AbstractUpdMgr.chg()
       is called
-    - fix bug: when there are two equal literals connected
-      to a node, clicking on one may focus the other.
 
     - views proportional to window size
 
@@ -25,19 +23,18 @@
 
     - JAR target; java -jar loom.jar should start the client
 
-    + clip instead of truncate text
-    + Copy URI / copy literal text to clipboard
-    + WebStart deployment of Loom?
-    + in Wheel view, have a minimum angle, so that nodes
-      aren't shown arbitrarily close. Figure out how:
-      we cannot always show all nodes any more, then.
-
     humppake:
       + Optional node view showing Resources as green ovals
         (no border) and Literals as yellow rectangles (no border).
         This convention is used e.g. by the RDF specs.
 
 later (or now if somebody wants to):
+
+    - clip instead of truncate text
+    - Copy URI / copy literal text to clipboard
+    - fix bug: when there are two equal literals connected
+      to a node, clicking on one may focus the other.
+
     - fix bug: when Cursor.java has an insane rotation
       (too high or too small), it should fix itself
       when move() is called.
@@ -55,6 +52,11 @@
     - more views, e.g. with more than the immediate neighbours showing
 
     - load RDF from the Web ('semantic web browsing')
+
+    + WebStart deployment of Loom?
+    + in Wheel view, have a minimum angle, so that nodes
+      aren't shown arbitrarily close. Figure out how:
+      we cannot always show all nodes any more, then.
 
 humppake:
     - enhance wheel (or create additional Wheel Views):
Index: fenfire/org/fenfire/loom/Loom.java
diff -u fenfire/org/fenfire/loom/Loom.java:1.28 
fenfire/org/fenfire/loom/Loom.java:1.29
--- fenfire/org/fenfire/loom/Loom.java:1.28     Wed Mar 12 11:54:02 2003
+++ fenfire/org/fenfire/loom/Loom.java  Wed Mar 12 13:59:16 2003
@@ -153,6 +153,14 @@
     protected java.awt.List propList = new java.awt.List();
 
     protected Dialog goTo;
+    protected TextField goToText;
+
+    protected void showGoToDialog() {
+       String uri = cursor.focus.getURI();
+       goToText.setText(uri);
+       goToText.setCaretPosition(uri.length());
+       goTo.setVisible(true);
+    }
 
     public static void main(String[] args) throws RDFException, IOException,
                                                  org.xml.sax.SAXException {
@@ -191,8 +199,10 @@
        final MenuBar mBar = new MenuBar();
        Menu mFile = new Menu("File"); mBar.add(mFile);
        MenuItem mOpen = new MenuItem("Open..."); mFile.add(mOpen);
-       MenuItem mQuit = new MenuItem("Quit"); mFile.add(mQuit);
+       MenuItem mQuit = new MenuItem("Quit (Ctrl-Q)"); mFile.add(mQuit);
        Menu mView = new Menu("View"); mBar.add(mView);
+       MenuItem mGoTo = new MenuItem("Go to URI... (Ctrl-G)"); 
+       mView.add(mGoTo); mView.add(new MenuItem("-"));
        MenuItem mSimple = new /*Checkbox*/MenuItem("Simple View"); 
        MenuItem mWheel = new /*Checkbox*/MenuItem("Wheel View");
        mView.add(mSimple); mView.add(mWheel);
@@ -219,6 +229,12 @@
                }
            });
 
+       mGoTo.addActionListener(new ActionListener() {
+               public void actionPerformed(ActionEvent _) {
+                   showGoToDialog();
+               }
+           });
+
        mSimple.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent _) {
                    viewcur = 0;
@@ -394,7 +410,7 @@
                    }
 
                    if(s.equals("Ctrl-G"))
-                       goTo.setVisible(true);
+                       showGoToDialog();
                    else if(s.equals("i") || s.equals("Up"))
                        cursor.rotate(-1);
                    else if(s.equals(",") || s.equals("Down"))
@@ -467,7 +483,7 @@
                    goTo = new Dialog(frame, "Go to URI");
                    Panel goToP = new Panel(); goTo.add(goToP);
                    Label goToLabel = new Label("Go to URI:");
-                   final TextField goToText = new TextField(25);
+                   goToText = new TextField(25);
                    goToP.add(goToLabel); goToP.add(goToText);
                    Button ok = new Button("Go!"); goToP.add(ok);
                    ok.addActionListener(new ActionListener() {
@@ -482,7 +498,13 @@
                                AbstractUpdateManager.chg();
                            }
                        });
+
+                   // strangely, these two lines are needed here
+                   // for me: without them, the window doesn't show
+                   // when I press Ctrl-G. some kind of
+                   // threading issues? -b
                    goTo.setVisible(true);
+                   goTo.setVisible(false);
                    
                    
                    fileDialog = new FileDialog(frame, "Open",




reply via email to

[Prev in Thread] Current Thread [Next in Thread]