01: /*
02: * Rocker.java
03: *
04: * Created on 19 April 2007, 10:06
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package com.xoetrope.svgcomponentswizard;
11:
12: import net.xoetrope.optional.svg.XSvgButton;
13: import net.xoetrope.swing.XPanel;
14: import net.xoetrope.xui.XPage;
15: import net.xoetrope.xui.XPageManager;
16: import net.xoetrope.xui.XProjectManager;
17:
18: /**
19: *
20: * @author kingsley.elmes
21: */
22: public class Rocker extends XPage {
23: protected XSvgButton svgRocker;
24:
25: /** Creates a new instance of Rocker */
26: public Rocker() {
27: }
28:
29: public void pageCreated() {
30: svgRocker = (XSvgButton) findComponent("svgRocker");
31: svgRocker.setOpaque(false);
32: svgRocker.setImage(project.findResource("rocker.svg"));
33: String[][] ids = { { "rocker", "border_over", null },
34: { "north", "rollover_north", "pressed_north" },
35: { "south", "rollover_south", "pressed_south" },
36: { "east", "rollover_east", "pressed_east" },
37: { "west", "rollover_west", "pressed_west" }, };
38: svgRocker.setElementIds(ids);
39: }
40:
41: public void showPage() {
42: XPageManager pageMgr = XProjectManager.getPageManager();
43: pageMgr.showPage("Welcome");
44: }
45: }
|