]> git.argeo.org Git - gpl/argeo-slc.git/blob - sandbox/argeo.slc.jemmytest/src/main/java/org/argeo/slc/jemmytest/uiparts/MainFrame.java
ca17de3205ccf20ee4139431983fb0bdac94032a
[gpl/argeo-slc.git] / sandbox / argeo.slc.jemmytest / src / main / java / org / argeo / slc / jemmytest / uiparts / MainFrame.java
1 package org.argeo.slc.jemmytest.uiparts;
2
3 import org.argeo.slc.detached.DetachedContext;
4 import org.argeo.slc.detached.DetachedRequest;
5 import org.argeo.slc.detached.ui.UiPart;
6 import org.netbeans.jemmy.operators.JButtonOperator;
7 import org.netbeans.jemmy.operators.JFrameOperator;
8 import org.netbeans.jemmy.operators.JLabelOperator;
9
10 public class MainFrame implements UiPart {
11 private JFrameOperator frame = null;
12 private JButtonOperator button = null;
13 private JButtonOperator buttonStart = null;
14 private JLabelOperator label = null;
15
16 public void init(DetachedContext context, DetachedRequest request) {
17 frame = new JFrameOperator("HelloWorldSwing");
18 button = new JButtonOperator(frame, "Button");
19 buttonStart = new JButtonOperator(frame, "Start");
20 String labelStr = request.getProperties()
21 .getProperty("jemmyTest.label");
22 label = new JLabelOperator(frame, labelStr);
23 }
24
25 public void changeLabel() {
26 button.push();
27 }
28
29 public void openDialog() {
30 buttonStart.push();
31 }
32
33 public String getLabelText() {
34 return label.getText();
35 }
36 }