/** * Notifies all views of a focus change. * * @param pre focused pre value * @param vw the calling view */ public void focus(final int pre, final View vw) { if (gui.context.focused == pre) return; gui.context.focused = pre; for (final View v : view) if (v != vw && v.visible()) v.refreshFocus(); if (pre != -1) { gui.status.setText(Token.string(ViewData.path(gui.context.data(), pre))); } }
@Override public void execute(final GUI gui) { final int pre = gui.context.marked.pres[0]; final byte[] txt = ViewData.path(gui.context.data(), pre); // copy path to clipboard final Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); clip.setContents(new StringSelection(Token.string(txt)), null); }