public void copyToClipboard(Transferable selection) {
clipboardOwner = true;
clipboard.setContents(selection, this);
for (int i = 0, n = listFrameList.size(); i < n; i++) {
ListFrame listFrame = (ListFrame) listFrameList.get(i);
listFrame.enablePasteAction();
}
}
// This method is synchronized to avoid two requests being processed at the same time.
public synchronized void handle(Command command) {