/[gzz]/gzz/gzz/view/DefaultBinder.java
ViewVC logotype

Diff of /gzz/gzz/view/DefaultBinder.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by benja, Wed Oct 9 09:10:08 2002 UTC revision 1.6 by benja, Thu Oct 10 15:57:42 2002 UTC
# Line 92  public static final String rcsid = "$Id$ Line 92  public static final String rcsid = "$Id$
92       */       */
93      public Set markedCells = new HashSet();      public Set markedCells = new HashSet();
94            
95      /** A string describing the last error that occurred, if any.      /** The last client exception that occurred, if any.
96       */       */
97      public String errstring = null;      public ClientException lastClientException;
98    
99      public DefaultBinder(Fallback fallback) {      public DefaultBinder(Fallback fallback) {
100          this.fallback = fallback;          this.fallback = fallback;
101      }      }
102    
103    
104      void dir(int win, int dim, int dir) {      void dir(int win, int dim, int dir) throws ClientException {
105          Fallback.Win w = fallback.windows[win];          Fallback.Win w = fallback.windows[win];
106          Fallback.Win other = fallback.windows[1-win];          Fallback.Win other = fallback.windows[1-win];
107          Dim[] dims = w.dims;          Dim[] dims = w.dims;
# Line 198  public static final String rcsid = "$Id$ Line 198  public static final String rcsid = "$Id$
198          }          }
199    
200          wasInWindow = (Fallback.Win)win;          wasInWindow = (Fallback.Win)win;
201          errstring = null;          lastClientException = null;
202    
203          try {          try {
204              if(fallback.mode == NORMAL)              if(fallback.mode == NORMAL)
# Line 220  public static final String rcsid = "$Id$ Line 220  public static final String rcsid = "$Id$
220              directOp = NONE; throw e;              directOp = NONE; throw e;
221          } catch(RuntimeException e) {          } catch(RuntimeException e) {
222              directOp = NONE; throw e;              directOp = NONE; throw e;
223            } catch(ClientException e) {
224                lastClientException = e;
225                directOp = NONE;
226          } finally {          } finally {
227              AbstractUpdateManager.chg();              AbstractUpdateManager.chg();
228          }          }
229      }      }
230    
231      public void normalModeKeystroke(String k) {      public void normalModeKeystroke(String k) throws ClientException {
232          if(k.equals("Tab")) {          if(k.equals("Tab")) {
233              if(dbg) pa("Switching to text edit mode.");              if(dbg) pa("Switching to text edit mode.");
234              fallback.mode = TEXT_1;              fallback.mode = TEXT_1;
# Line 267  public static final String rcsid = "$Id$ Line 270  public static final String rcsid = "$Id$
270                  cell.delete();                  cell.delete();
271                  fallback.windows[1].cursor = home;                  fallback.windows[1].cursor = home;
272              } else {              } else {
273                  errstring = "Sorry, I can't delete the home cell.";                  throw new ClientException(
274                        "Sorry, I can't delete the home cell.");
275              }              }
276          } else if(k.length() == 1) {          } else if(k.length() == 1) {
277              switch(k.charAt(0)) {              switch(k.charAt(0)) {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26