fixing copy and paste. works, except if pasted from a TextArea through the windows pop-up menu.

This commit is contained in:
amontano 2002-10-26 15:49:55 +00:00
parent 627b35cd33
commit d35048a067
2 changed files with 8 additions and 5 deletions

View file

@ -69,7 +69,6 @@ public class DuffScannerPanel extends ScannerPanel
fullDef = new TextArea("",0,0,TextArea.SCROLLBARS_VERTICAL_ONLY); fullDef = new TextArea("",0,0,TextArea.SCROLLBARS_VERTICAL_ONLY);
fullDef.setEditable(false); fullDef.setEditable(false);
model = new DictionaryTableModel(null); model = new DictionaryTableModel(null);
table = new DictionaryTable(model, fullDef); table = new DictionaryTable(model, fullDef);
table.activateTibetan(true); table.activateTibetan(true);
@ -199,5 +198,5 @@ public class DuffScannerPanel extends ScannerPanel
showingTibetan = false; showingTibetan = false;
} }
table.repaint(); table.repaint();
} }
} }

View file

@ -63,13 +63,16 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
mb.add(m); mb.add(m);
m = new Menu ("Edit"); m = new Menu ("Edit");
mnuCut = new MenuItem("Cut"); mnuCut = new MenuItem("Cut");
mnuCut.setShortcut(new MenuShortcut(KeyEvent.VK_X));
m.add(mnuCut); m.add(mnuCut);
mnuCut.addActionListener(this); mnuCut.addActionListener(this);
mnuCopy = new MenuItem("Copy"); mnuCopy = new MenuItem("Copy");
mnuCopy.setShortcut(new MenuShortcut(KeyEvent.VK_C));
m.add(mnuCopy); m.add(mnuCopy);
mnuCopy.addActionListener(this); mnuCopy.addActionListener(this);
mnuPaste = new MenuItem("Paste"); mnuPaste = new MenuItem("Paste");
mnuPaste.setShortcut(new MenuShortcut(KeyEvent.VK_V));
m.add(mnuPaste); m.add(mnuPaste);
mnuPaste.addActionListener(this); mnuPaste.addActionListener(this);
mnuDelete = new MenuItem("Delete"); mnuDelete = new MenuItem("Delete");
@ -77,6 +80,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
mnuDelete.addActionListener(this); mnuDelete.addActionListener(this);
m.add("-"); m.add("-");
mnuSelectAll = new MenuItem("Select all"); mnuSelectAll = new MenuItem("Select all");
mnuSelectAll.setShortcut(new MenuShortcut(KeyEvent.VK_A));
m.add(mnuSelectAll); m.add(mnuSelectAll);
mnuSelectAll.addActionListener(this); mnuSelectAll.addActionListener(this);
mnuClear = new MenuItem("Clear all"); mnuClear = new MenuItem("Clear all");
@ -116,7 +120,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
{ {
if (args.length!=1 && args.length!=2) if (args.length!=1 && args.length!=2)
{ {
System.out.println("Sintaxis: java SimpleScannerPanel [options] arch-dict"); System.out.println("Sintaxis: java WindowScannerFilter [options] arch-dict");
System.out.println("Options:"); System.out.println("Options:");
System.out.println(" -simple: runs the non-swing version."); System.out.println(" -simple: runs the non-swing version.");
System.out.println(TibetanScanner.copyrightASCII); System.out.println(TibetanScanner.copyrightASCII);