public abstract class StringPaster extends MouseAdapter
pasted(java.lang.String)
method and add it to the component you want to act on
using Component.addMouseListener(java.awt.event.MouseListener)
.Constructor and Description |
---|
StringPaster() |
Modifier and Type | Method and Description |
---|---|
protected Toolkit |
getToolkit()
Returns the Toolkit holding the selection.
|
protected boolean |
isPasteEvent(MouseEvent evt)
Determines whether a mouse event counts as a paste.
|
void |
mouseClicked(MouseEvent evt)
Invokes
pasted(java.lang.String) if appropriate. |
protected abstract void |
pasted(String str)
Invoked when a paste event occurs.
|
mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
public void mouseClicked(MouseEvent evt)
pasted(java.lang.String)
if appropriate.mouseClicked
in interface MouseListener
mouseClicked
in class MouseAdapter
protected boolean isPasteEvent(MouseEvent evt)
evt
- mouse eventevt
counts as a paste gestureprotected Toolkit getToolkit()
protected abstract void pasted(String str)
str
- a string that has been pasted from the
system-wide selectionCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.