void copy() { if (this.dotInfo != this.markInfo && panel != null) { Clipboard clip = panel.getToolkit().getSystemClipboard(); if (clip != null) { String selectedText = lastHighlightedString; try { clip.setContents(new StringSelection(selectedText), null); } catch (IllegalStateException ise) { // clipboard was unavailable // no need to provide error feedback to user since updating // the system selection is not a user invoked action } } } }
void copy() { if (this.dotInfo != this.markInfo && panel != null) { Clipboard clip = panel.getToolkit().getSystemClipboard(); if (clip != null) { String selectedText = lastHighlightedString; try { clip.setContents(new StringSelection(selectedText), null); } catch (IllegalStateException ise) { // clipboard was unavailable // no need to provide error feedback to user since updating // the system selection is not a user invoked action } } } }
private void updateSystemSelection() { if (this.dotInfo != this.markInfo && panel != null) { Clipboard clip = panel.getToolkit().getSystemSelection(); if (clip != null) { String selectedText = lastHighlightedString; try { clip.setContents(new StringSelection(selectedText), null); } catch (IllegalStateException ise) { // clipboard was unavailable // no need to provide error feedback to user since updating // the system selection is not a user invoked action } } } }
private void updateSystemSelection() { if (this.dotInfo != this.markInfo && panel != null) { Clipboard clip = panel.getToolkit().getSystemSelection(); if (clip != null) { String selectedText = lastHighlightedString; try { clip.setContents(new StringSelection(selectedText), null); } catch (IllegalStateException ise) { // clipboard was unavailable // no need to provide error feedback to user since updating // the system selection is not a user invoked action } } } }