2
* Copyright 2005-2008 Kirill Grouchnikov, based on work by
3
* Sun Microsystems, Inc. All rights reserved.
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
import javax.swing.JFrame;
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;
32
* The main method for taking screenshots for Substance documentation.
34
* @author Kirill Grouchnikov
36
public class StatusBarRunner {
38
* Runs the specified screenshot robot.
44
public static void main(String[] args) throws Exception {
45
JFrame.setDefaultLookAndFeelDecorated(true);
47
String frameClass = "docrobot.StatusBarFrame";
48
String subfolder = "statusbar";
49
Map<String, SkinInfo> skins = SubstanceLookAndFeel.getAllSkins();
50
Robot robot = BasicRobot.robotWithNewAwtHierarchy();
52
for (Map.Entry<String, SkinInfo> skinEntry : skins.entrySet()) {
53
String key = skinEntry.getKey();
54
String normalized = key.toLowerCase().replaceAll(" ", "");
56
new FrameRobot(frameClass, (SubstanceSkin) Class.forName(
57
skinEntry.getValue().getClassName()).newInstance(),
58
"C:/jprojects/substance-swingx/www/images/" + subfolder
59
+ "/" + normalized, robot).run();
60
} catch (Throwable t) {