-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
185 changed files
with
5,005 additions
and
1,824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...es/contacts-example/src/main/java/de/saxsys/mvvmfx/examples/contacts/model/Countries.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package de.saxsys.mvvmfx.examples.contacts.model; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import java.util.ArrayList; | ||
|
||
@XmlRootElement(name = "iso_3166_entries") | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class Countries { | ||
|
||
@XmlElement(name = "iso_3166_entry") | ||
private ArrayList<Country> countries; | ||
|
||
public ArrayList<Country> getCountries() { | ||
return countries; | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...ple/src/main/java/de/saxsys/mvvmfx/examples/contacts/model/countries/CountrySelector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package de.saxsys.mvvmfx.examples.contacts.model.countries; | ||
|
||
import de.saxsys.mvvmfx.examples.contacts.model.Country; | ||
import de.saxsys.mvvmfx.examples.contacts.model.Subdivision; | ||
import javafx.beans.property.ReadOnlyBooleanProperty; | ||
import javafx.beans.property.ReadOnlyStringProperty; | ||
import javafx.collections.ObservableList; | ||
|
||
/** | ||
* Implementations of this interface are used to encapsulate the process of loading available countries | ||
* and their subdivisions (if available). | ||
* | ||
* Instances are meant to be a stateful wrapper around the existing countries. | ||
* You should create an instance of this class, call the {@link #init()} method | ||
* and then bind the UI to the provided observable lists ( | ||
* {@link #availableCountries()} and {@link #subdivisions()}). | ||
* | ||
* To choose a country use the {@link #setCountry(Country)} method. This | ||
* will lead to a change of the {@link #subdivisions()} list. | ||
*/ | ||
public interface CountrySelector { | ||
|
||
void init(); | ||
|
||
void setCountry(Country country); | ||
|
||
ObservableList<Country> availableCountries(); | ||
|
||
ReadOnlyStringProperty subdivisionLabel(); | ||
|
||
ObservableList<Subdivision> subdivisions(); | ||
|
||
ReadOnlyBooleanProperty inProgressProperty(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.