| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package docrobot; |
| 20 |
|
| 21 |
import java.util.Map; |
| 22 |
|
| 23 |
import javax.swing.JFrame; |
| 24 |
|
| 25 |
import org.fest.swing.core.BasicRobot; |
| 26 |
import org.fest.swing.core.Robot; |
| 27 |
import org.pushingpixels.substance.api.SubstanceLookAndFeel; |
| 28 |
import org.pushingpixels.substance.api.SubstanceSkin; |
| 29 |
import org.pushingpixels.substance.api.skin.SkinInfo; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
public class MonthViewRunner { |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
public static void main(String[] args) throws Exception { |
| 45 |
JFrame.setDefaultLookAndFeelDecorated(true); |
| 46 |
|
| 47 |
String frameClass = "docrobot.MonthViewFrame"; |
| 48 |
String subfolder = "monthview"; |
| 49 |
Map<String, SkinInfo> skins = SubstanceLookAndFeel.getAllSkins(); |
| 50 |
Robot robot = BasicRobot.robotWithNewAwtHierarchy(); |
| 51 |
for (Map.Entry<String, SkinInfo> skinEntry : skins.entrySet()) { |
| 52 |
String key = skinEntry.getKey(); |
| 53 |
String normalized = key.toLowerCase().replaceAll(" ", ""); |
| 54 |
new FrameRobot(frameClass, (SubstanceSkin) Class.forName( |
| 55 |
skinEntry.getValue().getClassName()).newInstance(), |
| 56 |
"C:/jprojects/substance-swingx/www/images/" + subfolder |
| 57 |
+ "/" + normalized, robot).run(); |
| 58 |
} |
| 59 |
} |
| 60 |
} |