All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.uqbar.arena.tests.nestedCombos.Country.scala Maven / Gradle / Ivy

There is a newer version: 3.6.3
Show newest version
package org.uqbar.arena.tests.nestedCombos

import scala.collection.mutable.Buffer
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import org.uqbar.commons.model.annotations.Observable

@Observable
class Country(var name: String) {
  var provinceName = ""
  var provinces: java.util.List[Province] = Buffer[Province]()
  var provinceSelected:Province=_
  
  def addProvince(p:String) = provinces.add(new Province(p))
  def addProvince():Unit = provinces.add(new Province(provinceName))
  def removeProvince() = provinces.-=(provinceSelected);provinceSelected=null
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy