|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.gui.clipboard.ClipboardMgr
public final class ClipboardMgr
The clipboard manager handles all clipboard activity of a Jaspira application. It supports a multi-entry clipboard that can be connected to a clipboard toolbox for easy access.
| Field Summary | |
|---|---|
static int |
DEFAULT_CAPACITY
Number of clipboard entries. |
| Method Summary | |
|---|---|
void |
addClipboardListener(javax.swing.event.ChangeListener listener)
Adds a property change listener to the listener list. |
void |
addEntry(java.awt.datatransfer.Transferable entry)
Adds an entry to the clipboard. |
protected void |
fireClipboardChanged()
Fires a 'clipboard change' event to all registered clipboard change listeners. |
int |
getCapacity()
Returns the current capacity of the clipboard. |
java.awt.datatransfer.Transferable |
getCurrentEntry()
Returns the current entry of the clipboard. |
java.util.List |
getEntries()
Returns all current entries. |
java.awt.datatransfer.Transferable |
getEntryAt(int index)
Returns the entry with the given index. |
static ClipboardMgr |
getInstance()
Returns the singleton instance of the clipboard manager. |
int |
getNumberOfEntries()
Returns the number of entries currently in the clipboard. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Is called when the clipboard manager is no longer owner of the content of the system clipboard. |
void |
removeClipboardListener(javax.swing.event.ChangeListener listener)
Removes a property change listener from the listener list. |
void |
setCapacity(int capacity)
Sets the capacity of the clipboard. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_CAPACITY
| Method Detail |
|---|
public static ClipboardMgr getInstance()
public int getNumberOfEntries()
public void addEntry(java.awt.datatransfer.Transferable entry)
entry - The entry to addpublic int getCapacity()
public void setCapacity(int capacity)
public java.awt.datatransfer.Transferable getCurrentEntry()
public java.awt.datatransfer.Transferable getEntryAt(int index)
public java.util.List getEntries()
protected void fireClipboardChanged()
public void addClipboardListener(javax.swing.event.ChangeListener listener)
listener - The listener to be addedpublic void removeClipboardListener(javax.swing.event.ChangeListener listener)
listener - The listener to be removed
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
lostOwnership in interface java.awt.datatransfer.ClipboardOwnerClipboardOwner.lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||