public static void main(String[] args) { TheBridgeScene newScene = new TheBridgeScene(); OEFrame avatarEditor = ObjectEditor.edit(newScene); avatarEditor.setSize(800, 800); // Rotate left arm. newScene.getArthur().getArms().getLeftLine().rotate(100); avatarEditor.refresh(); ThreadSupport.sleep(1000); newScene.getArthur().getArms().getLeftLine().rotate(60); avatarEditor.refresh(); ThreadSupport.sleep(1000); newScene.getArthur().getArms().getLeftLine().rotate(-45); avatarEditor.refresh(); ThreadSupport.sleep(1000); // Rotate right arm. newScene.getArthur().getArms().getRightLine().rotate(100); avatarEditor.refresh(); ThreadSupport.sleep(1000); newScene.getArthur().getArms().getRightLine().rotate(60); avatarEditor.refresh(); ThreadSupport.sleep(1000); newScene.getArthur().getArms().getRightLine().rotate(45); avatarEditor.refresh(); ThreadSupport.sleep(1000); // Move avatars. newScene.getArthur().moveAvatar(200, 150); avatarEditor.refresh(); ThreadSupport.sleep(1000); newScene.getGuard().moveAvatar(100, -50); avatarEditor.refresh(); }
public static void main(String[] args) { final int initWeight = 75; final double initHeight = 1.77; final int sleepTime = 3000; ABMISpreadsheet bmiSpreadsheet = new ABMISpreadsheet(); bmiSpreadsheet.setHeight(initHeight); bmiSpreadsheet.setWeight(initWeight); OEFrame editor = ObjectEditor.edit(bmiSpreadsheet); ThreadSupport.sleep(sleepTime); editor.select(bmiSpreadsheet, "Weight"); bmiSpreadsheet.setWeight(sleepTime); editor.refresh(); ThreadSupport.sleep(sleepTime); editor.select(bmiSpreadsheet, "Height"); bmiSpreadsheet.setHeight(0); editor.refresh(); ThreadSupport.sleep(sleepTime); editor.select(bmiSpreadsheet, "Weight"); bmiSpreadsheet.setWeight(0); editor.refresh(); }