CheckableItem.java :  » SMS » wifisms-2010 » si » unimb » src » wifisms » ui » Android Open Source

Android Open Source » SMS » wifisms 2010 
wifisms 2010 » si » unimb » src » wifisms » ui » CheckableItem.java
package si.unimb.src.wifisms.ui;

import si.unimb.src.wifisms.util.SettingsType;

/**
 * Item with Check-state
 */
public class CheckableItem {
    
    private boolean checked;
    private String name;
    private SettingsType type;
    
    public CheckableItem(String name, boolean checked, SettingsType type) {
        this.name = name;
        this.checked = checked;
        this.type = type;
    }
    
    public SettingsType getType() {
    return type;
  }

  public void setType(SettingsType type) {
    this.type = type;
  }

  public void setChecked(boolean checked) {
        this.checked = checked;
    }
    public boolean isChecked() {
        return checked;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    
    public void toggle() {
        this.checked = !this.checked;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.