001: /*
002: * Copyright 2006-2007 Pentaho Corporation. All rights reserved.
003: * This software was developed by Pentaho Corporation and is provided under the terms
004: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
005: * this file except in compliance with the license. If you need a copy of the license,
006: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt.
007: *
008: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
009: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
010: * the license for the specific language governing your rights and limitations.
011: *
012: * Additional Contributor(s): Martin Schmid gridvision engineering GmbH
013: */
014: package org.pentaho.reportdesigner.crm.report.tests;
015:
016: import org.jetbrains.annotations.NonNls;
017: import org.jetbrains.annotations.NotNull;
018:
019: import java.awt.*;
020:
021: /**
022: * User: Martin
023: * Date: 23.03.2006
024: * Time: 20:29:34
025: */
026: @SuppressWarnings({"ALL"})
027: public class DesktopPropertyTest {
028:
029: @NonNls
030: @NotNull
031: public static String[] sortedProperties = new String[] {
032: "DnD.gestureMotionThreshold", "awt.dynamicLayoutSupported",
033: "awt.file.showAttribCol", "awt.file.showHiddenFiles",
034: "awt.mouse.numButtons", "awt.multiClickInterval",
035: "awt.wheelMousePresent", "win.3d.backgroundColor",
036: "win.3d.darkShadowColor", "win.3d.highlightColor",
037: "win.3d.lightColor", "win.3d.shadowColor",
038: "win.ansiFixed.font", "win.ansiFixed.font.height",
039: "win.ansiVar.font", "win.ansiVar.font.height",
040: "win.button.textColor", "win.defaultGUI.font",
041: "win.defaultGUI.font.height",
042: "win.desktop.backgroundColor", "win.deviceDefault.font",
043: "win.deviceDefault.font.height", "win.drag.height",
044: "win.drag.width", "win.frame.activeBorderColor",
045: "win.frame.activeCaptionColor",
046: "win.frame.activeCaptionGradientColor",
047: "win.frame.backgroundColor",
048: "win.frame.captionButtonHeight",
049: "win.frame.captionButtonWidth", "win.frame.captionFont",
050: "win.frame.captionFont.height",
051: "win.frame.captionGradientsOn", "win.frame.captionHeight",
052: "win.frame.captionTextColor", "win.frame.color",
053: "win.frame.fullWindowDragsOn",
054: "win.frame.inactiveBorderColor",
055: "win.frame.inactiveCaptionColor",
056: "win.frame.inactiveCaptionGradientColor",
057: "win.frame.inactiveCaptionTextColor",
058: "win.frame.sizingBorderWidth",
059: "win.frame.smallCaptionButtonHeight",
060: "win.frame.smallCaptionButtonWidth",
061: "win.frame.smallCaptionFont",
062: "win.frame.smallCaptionFont.height",
063: "win.frame.smallCaptionHeight", "win.frame.textColor",
064: "win.highContrast.on", "win.icon.font",
065: "win.icon.font.height", "win.icon.hspacing",
066: "win.icon.titleWrappingOn", "win.icon.vspacing",
067: "win.item.highlightColor", "win.item.highlightTextColor",
068: "win.item.hotTrackedColor", "win.item.hotTrackingOn",
069: "win.mdi.backgroundColor", "win.menu.backgroundColor",
070: "win.menu.buttonWidth", "win.menu.font",
071: "win.menu.font.height", "win.menu.height",
072: "win.menu.keyboardCuesOn", "win.menu.textColor",
073: "win.menubar.backgroundColor", "win.messagebox.font",
074: "win.messagebox.font.height", "win.oemFixed.font",
075: "win.oemFixed.font.height", "win.properties.version",
076: "win.scrollbar.backgroundColor", "win.scrollbar.height",
077: "win.scrollbar.width", "win.sound.asterisk",
078: "win.sound.close", "win.sound.default",
079: "win.sound.exclamation", "win.sound.exit",
080: "win.sound.hand", "win.sound.maximize",
081: "win.sound.menuCommand", "win.sound.menuPopup",
082: "win.sound.minimize", "win.sound.open",
083: "win.sound.question", "win.sound.restoreDown",
084: "win.sound.restoreUp", "win.sound.start",
085: "win.status.font", "win.status.font.height",
086: "win.system.font", "win.system.font.height",
087: "win.systemFixed.font", "win.systemFixed.font.height",
088: "win.text.fontSmoothingContrast",
089: "win.text.fontSmoothingOn", "win.text.fontSmoothingType",
090: "win.text.grayedTextColor", "win.tooltip.backgroundColor",
091: "win.tooltip.font", "win.tooltip.font.height",
092: "win.tooltip.textColor", "win.xpstyle.colorName",
093: "win.xpstyle.dllName", "win.xpstyle.sizeName",
094: "win.xpstyle.themeActive" };
095:
096: public static void main(@NotNull
097: String[] args) {
098: System.out.println(Toolkit.getDefaultToolkit()
099: .getDesktopProperty("DnD.gestureMotionThreshold"));//NON-NLS
100: //TreeSet ts = new TreeSet(Arrays.asList(properties));
101: //for (Object o : ts)
102: //{
103: // System.out.println("\""+o+"\", ");
104: //}
105: //
106: //Object desktopProperty = Toolkit.getDefaultToolkit().getDesktopProperty("win.sound.asterisk");
107: //Object desktopProperty2 = Toolkit.getDefaultToolkit().getDesktopProperty("win.sound.asterisk");
108: //if (desktopProperty != null)
109: //{
110: // System.out.println("desktopProperty = " + desktopProperty.getClass());
111: // System.out.println("desktopProperty = " + desktopProperty.getClass().getSuperclass());
112: // Method[] methods = desktopProperty.getClass().getMethods();
113: // for (int i = 0; i < methods.length; i++)
114: // {
115: // Method method = methods[i];
116: // System.out.println("method = " + method);
117: // }
118: // try
119: // {
120: //
121: // Method method = desktopProperty.getClass().getMethod("run");
122: // method.setAccessible(true);
123: // method.invoke(desktopProperty);
124: // }
125: // catch (NoSuchMethodException e)
126: // {
127: // e.printStackTrace();
128: // }
129: // catch (IllegalAccessException e)
130: // {
131: // e.printStackTrace();
132: // }
133: // catch (InvocationTargetException e)
134: // {
135: // e.printStackTrace();
136: // }
137: //}
138: }
139: }
|