List of usage examples for java.awt.datatransfer FlavorEvent getSource
public Object getSource()
From source file:ja.lingo.application.gui.actions.PasteAndTranslateAction.java
public PasteAndTranslateAction(Model model) { this.model = model; Toolkit.getDefaultToolkit().getSystemClipboard().addFlavorListener(new FlavorListener() { public void flavorsChanged(FlavorEvent e) { setEnabled(((Clipboard) e.getSource()).isDataFlavorAvailable(DataFlavor.stringFlavor)); }/*from ww w . jav a 2s . c o m*/ }); }