Java Reference
In-Depth Information
The Deserialization Power of the FXML Format
Because the features that we cover in this section have more to do with deserializing generic Java objects, we will
move away from the GUI world and work with plain Java classes. We use the JavaBean defined in Listing 3-10 in our
discussion. It is a made-up class meant to illustrate the different FXML features.
Listing 3-10. FXMLBasicFeaturesBean.java
package projavafx.fxmlbasicfeatures;
import javafx.scene.paint.Color;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FXMLBasicFeaturesBean {
private String name;
private String address;
private boolean flag;
private int count;
private Color foreground;
private Color background;
private Double price;
private Double discount;
private List<Integer> sizes;
private Map<String, Double> profits;
private Long inventory;
private List<String> products = new ArrayList<String>();
private Map<String, String> abbreviations = new HashMap<>();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public boolean isFlag() {
return flag;
}
 
Search WWH ::




Custom Search