Package com.monkygames.wo.avatar

Examples of com.monkygames.wo.avatar.Avatar


public class TestXMLParser{

// ============= Constructors ============== //
    public TestXMLParser(String filename){
  AvatarXMLParser parser = new AvatarXMLParser();
  Avatar avatar = parser.getAvatarFromFile(filename);
  System.out.println(avatar);
    }
View Full Code Here


     * up-to-date weight.
     * @param weight the current weight calculated.
     **/
    public void updateWeight(Weight weight){
  // set this weight to the avatar selected
  Avatar avatar = (Avatar)avatarsCB.getSelectedItem();
  if(avatar != null){
      HealthData hd = healthLoader.getHealthData(avatar.info);
      if(hd == null){
    hd = new HealthData();
    hd.info = avatar.info;
View Full Code Here

     * @param weight the weight to be added.
     **/
    public void updateWeightSorted(Weight weight){
  boolean isAdded = false;
  // set this weight to the avatar selected
  Avatar avatar = (Avatar)avatarsCB.getSelectedItem();
  if(avatar != null){
      HealthData hd = healthLoader.getHealthData(avatar.info);
      if(hd == null){
    hd = new HealthData();
    hd.info = avatar.info;
View Full Code Here

     * Adds an avatar from xml file.
     **/
    private void addAvatar(){
  int retVal = chooser.showOpenDialog(this);
  if(retVal == JFileChooser.APPROVE_OPTION){
      Avatar avatar = avatarXMLParser.getAvatarFromFile(chooser.getSelectedFile().getAbsolutePath());
      if(avatar != null){
    if(avatarLoader.addAvatar(avatar)){
        // create health information!
        HealthData hd = new HealthData();
        hd.info = avatar.info;
View Full Code Here

    }
    /**
     * Exports to a CSV file.
     **/
    private void exportToCSV(){
  Avatar avatar = (Avatar)avatarsCB.getSelectedItem();
  boolean failed = false;
  if(avatar != null){
      HealthData hd = healthLoader.getHealthData(avatar.info);
      if(hd != null){
    int retVal = csvChooser.showSaveDialog(this);
View Full Code Here

    }
    public void itemStateChanged(ItemEvent evt){
  Object src = evt.getSource();
  if(src == avatarsCB || src == weightUnitCB || src == timeIncrCB){
      // load the avatars information
      Avatar avatar = (Avatar)avatarsCB.getSelectedItem();
      loadGraph(avatar);
  }
    }
View Full Code Here

TOP

Related Classes of com.monkygames.wo.avatar.Avatar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.