Changeset 3038 for trunk


Ignore:
Timestamp:
08/03/07 10:48:20 (13 years ago)
Author:
curtis
Message:

Gracefully handle case where clipboard contents are unavailable
(except on Mac OS X, apparently).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/data/Dataset.java

    r3015 r3038  
    306306      Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); 
    307307      if (clip != null) { 
    308         Transferable t = clip.getContents(null); 
     308        Transferable t = null; 
     309        try { 
     310          t = clip.getContents(null); 
     311        } 
     312        catch (IllegalStateException exc) { } // clipboard contents unavailable 
    309313        if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) { 
    310314          String s = null; 
Note: See TracChangeset for help on using the changeset viewer.