123 */
124 public void cleanup() {
125 initialized = false;
126 cleanupTargetInfo();
127 }
128
129 /**
130 * Clears the information on the current drop target.
131 *
132 * @throws XException if some X call failed.
133 */
134 public void cleanupTargetInfo() {
135 targetWindow = 0;
136 targetProxyWindow = 0;
137 targetProtocolVersion = 0;
138 }
139
140 /**
141 * Processes the specified client message event.
142 *
143 * @returns true if the event was successfully processed.
144 */
145 public abstract boolean processClientMessage(XClientMessageEvent xclient)
146 throws XException;
147
148 /* The caller must hold AWT_LOCK. */
149 public final boolean attachTargetWindow(long window, long time) {
150 assert XToolkit.isAWTLockHeldByCurrentThread();
151
152 TargetWindowInfo info = getTargetWindowInfo(window);
153 if (info == null) {
154 return false;
155 } else {
156 targetWindow = window;
157 targetProxyWindow = info.getProxyWindow();
158 targetProtocolVersion = info.getProtocolVersion();
159 return true;
160 }
161 }
162
163 /* The caller must hold AWT_LOCK. */
|
123 */
124 public void cleanup() {
125 initialized = false;
126 cleanupTargetInfo();
127 }
128
129 /**
130 * Clears the information on the current drop target.
131 *
132 * @throws XException if some X call failed.
133 */
134 public void cleanupTargetInfo() {
135 targetWindow = 0;
136 targetProxyWindow = 0;
137 targetProtocolVersion = 0;
138 }
139
140 /**
141 * Processes the specified client message event.
142 *
143 * @return true if the event was successfully processed.
144 */
145 public abstract boolean processClientMessage(XClientMessageEvent xclient)
146 throws XException;
147
148 /* The caller must hold AWT_LOCK. */
149 public final boolean attachTargetWindow(long window, long time) {
150 assert XToolkit.isAWTLockHeldByCurrentThread();
151
152 TargetWindowInfo info = getTargetWindowInfo(window);
153 if (info == null) {
154 return false;
155 } else {
156 targetWindow = window;
157 targetProxyWindow = info.getProxyWindow();
158 targetProtocolVersion = info.getProtocolVersion();
159 return true;
160 }
161 }
162
163 /* The caller must hold AWT_LOCK. */
|