com.mucommander.ui.dnd
Class ClipboardNotifier

java.lang.Object
  extended by com.mucommander.ui.dnd.ClipboardNotifier
All Implemented Interfaces:
java.awt.datatransfer.FlavorListener, java.util.EventListener

public class ClipboardNotifier
extends java.lang.Object
implements java.awt.datatransfer.FlavorListener

ClipboardNotifier allows an action to be dynamically enabled when the clipboard contains files, and disabled otherwise.

ClipboardNotifier requires Java 1.5 and does not work under Mac OS X (tested under Tiger with Java 1.5.0_06).

Author:
Maxence Bernard

Constructor Summary
ClipboardNotifier(javax.swing.Action action)
          Starts monitoring the clipboard for files and dynamically enable/disable the specified action accordingly.
 
Method Summary
 void flavorsChanged(java.awt.datatransfer.FlavorEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClipboardNotifier

public ClipboardNotifier(javax.swing.Action action)
Starts monitoring the clipboard for files and dynamically enable/disable the specified action accordingly. The action is initially enabled if the clipboard contains files.

Parameters:
action - the action to dynamically enable/disable when files are present/not present
Method Detail

flavorsChanged

public void flavorsChanged(java.awt.datatransfer.FlavorEvent event)
Specified by:
flavorsChanged in interface java.awt.datatransfer.FlavorListener


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard