mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-23 20:32:10 -04:00
adds Mac support for paste functionality in data editor, see #711
This commit is contained in:
parent
500c6cdcfd
commit
c48872d135
@ -182,7 +182,7 @@ public class DataEditor extends JDialog {
|
|||||||
setJMenuBar(menuBar);
|
setJMenuBar(menuBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractAction pasteAction = new AbstractAction("Paste") {
|
new ToolTipAction(Lang.get("menu_paste")) {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||||
@ -193,9 +193,7 @@ public class DataEditor extends JDialog {
|
|||||||
new ErrorMessage(Lang.get("msg_errorPastingData")).addCause(e1).show();
|
new ErrorMessage(Lang.get("msg_errorPastingData")).addCause(e1).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}.setAcceleratorCTRLplus('V').enableAcceleratorIn(table);
|
||||||
table.getInputMap().put(KeyStroke.getKeyStroke("control V"), "myPaste");
|
|
||||||
table.getActionMap().put("myPaste", pasteAction);
|
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
if (getWidth() < 150)
|
if (getWidth() < 150)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user