< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XSelection.java

Print this page




  93     private long[] formats = null;
  94     /* The AppContext in which the current owner was set. */
  95     private AppContext appContext = null;
  96     // The X server time of the last XConvertSelection() call;
  97     // protected with 'lock' and awtLock.
  98     private static long lastRequestServerTime;
  99     /* The time at which the current owner was set. */
 100     private long ownershipTime = 0;
 101     // True if we are the owner of this selection.
 102     private boolean isOwner;
 103     private OwnershipListener ownershipListener = null;
 104     private final Object stateLock = new Object();
 105 
 106     static {
 107         XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(),
 108                                     new SelectionEventHandler());
 109     }
 110 
 111     /*
 112      * Returns the XSelection object for the specified selection atom or
 113      * <code>null</code> if none exists.
 114      */
 115     static XSelection getSelection(XAtom atom) {
 116         return table.get(atom);
 117     }
 118 
 119     /**
 120      * Creates a selection object.
 121      *
 122      * @param  atom the selection atom
 123      * @throws NullPointerException if atom is {@code null}
 124      */
 125     XSelection(XAtom atom) {
 126         if (atom == null) {
 127             throw new NullPointerException("Null atom");
 128         }
 129         selectionAtom = atom;
 130         table.put(selectionAtom, this);
 131     }
 132 
 133     public XAtom getSelectionAtom() {




  93     private long[] formats = null;
  94     /* The AppContext in which the current owner was set. */
  95     private AppContext appContext = null;
  96     // The X server time of the last XConvertSelection() call;
  97     // protected with 'lock' and awtLock.
  98     private static long lastRequestServerTime;
  99     /* The time at which the current owner was set. */
 100     private long ownershipTime = 0;
 101     // True if we are the owner of this selection.
 102     private boolean isOwner;
 103     private OwnershipListener ownershipListener = null;
 104     private final Object stateLock = new Object();
 105 
 106     static {
 107         XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(),
 108                                     new SelectionEventHandler());
 109     }
 110 
 111     /*
 112      * Returns the XSelection object for the specified selection atom or
 113      * {@code null} if none exists.
 114      */
 115     static XSelection getSelection(XAtom atom) {
 116         return table.get(atom);
 117     }
 118 
 119     /**
 120      * Creates a selection object.
 121      *
 122      * @param  atom the selection atom
 123      * @throws NullPointerException if atom is {@code null}
 124      */
 125     XSelection(XAtom atom) {
 126         if (atom == null) {
 127             throw new NullPointerException("Null atom");
 128         }
 129         selectionAtom = atom;
 130         table.put(selectionAtom, this);
 131     }
 132 
 133     public XAtom getSelectionAtom() {


< prev index next >