fixing copy and paste. works, except if pasted from a TextArea through the windows pop-up menu.
This commit is contained in:
parent
627b35cd33
commit
d35048a067
2 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||||
|
|
|
@ -64,12 +64,15 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
|
|
||||||
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);
|
||||||
|
|
Loading…
Reference in a new issue