221 public boolean equals(Object o) {
222 if (o == this) {
223 return true;
224 }
225 try {
226 return winEventName.equals(((WinPlaySound)o).winEventName);
227 } catch (Exception e) {
228 return false;
229 }
230 }
231
232 public int hashCode() {
233 return winEventName.hashCode();
234 }
235 }
236
237 /*
238 * Called by WToolkit when Windows settings change-- we (re)load properties and
239 * set new values.
240 */
241 synchronized Map<String, Object> getProperties() {
242 ThemeReader.flush();
243
244 // load the changed properties into a new hashmap
245 map = new HashMap<String, Object>();
246 getWindowsParameters();
247 map.put(SunToolkit.DESKTOPFONTHINTS, SunToolkit.getDesktopFontHints());
248 map.put(PROP_NAMES, getKeyNames());
249 // DnD uses one value for x and y drag diff, but Windows provides
250 // separate ones. For now, just use the x value - rnk
251 map.put("DnD.Autoscroll.cursorHysteresis", map.get("win.drag.x"));
252
253 return (Map<String, Object>) map.clone();
254 }
255
256 /*
257 * This returns the value for the desktop property "awt.font.desktophints"
258 * It builds this using the Windows desktop properties to return
259 * them as platform independent hints.
260 * This requires that the Windows properties have already been gathered
|
221 public boolean equals(Object o) {
222 if (o == this) {
223 return true;
224 }
225 try {
226 return winEventName.equals(((WinPlaySound)o).winEventName);
227 } catch (Exception e) {
228 return false;
229 }
230 }
231
232 public int hashCode() {
233 return winEventName.hashCode();
234 }
235 }
236
237 /*
238 * Called by WToolkit when Windows settings change-- we (re)load properties and
239 * set new values.
240 */
241 @SuppressWarnings("unchecked")
242 synchronized Map<String, Object> getProperties() {
243 ThemeReader.flush();
244
245 // load the changed properties into a new hashmap
246 map = new HashMap<String, Object>();
247 getWindowsParameters();
248 map.put(SunToolkit.DESKTOPFONTHINTS, SunToolkit.getDesktopFontHints());
249 map.put(PROP_NAMES, getKeyNames());
250 // DnD uses one value for x and y drag diff, but Windows provides
251 // separate ones. For now, just use the x value - rnk
252 map.put("DnD.Autoscroll.cursorHysteresis", map.get("win.drag.x"));
253
254 return (Map<String, Object>) map.clone();
255 }
256
257 /*
258 * This returns the value for the desktop property "awt.font.desktophints"
259 * It builds this using the Windows desktop properties to return
260 * them as platform independent hints.
261 * This requires that the Windows properties have already been gathered
|