setFlag(flag);
}
- public void setName(String name) {
- this.name = name;
- }
-
public String getName() {
return name;
}
- public void setRegion(String region) {
- this.region = region;
+ public void setName(String name) {
+ this.name = name;
}
- public void setLat(double lat) {
- this.lat = lat;
+ public void setRegion(String region) {
+ this.region = region;
}
public double getLat() {
return lat;
}
- public void setLng(double lng) {
- this.lng = lng;
+ public void setLat(double lat) {
+ this.lat = lat;
}
public double getLng() {
return lng;
}
- public void setFlag(String flag) {
- this.flag = flag;
+ public void setLng(double lng) {
+ this.lng = lng;
}
public String getFlag() {
return flag;
}
+ public void setFlag(String flag) {
+ this.flag = flag;
+ }
+
public int distanceTo(Country country) {
if ((this.getLat() == country.getLat()) && (this.getLng() == country.getLng())) {
return 0;
private MainWindowsView() {
}
+ public static MainWindowsView getInstance() {
+ return ourInstance;
+ }
+
public void setMainWindowsView(String title, PersonView personView) {
this.currentPersonView = personView;
Container panel = getContentPane();
panel.add(getCurrentPersonView().getPersonPanel(), BorderLayout.CENTER);
}
- public static MainWindowsView getInstance() {
- return ourInstance;
- }
-
public PersonView getCurrentPersonView() {
return currentPersonView;
}
setDistanceFromReference(0);
}
- public void setFirstname(Firstname firstname) {
- this.firstname = firstname;
- }
-
public Firstname getFirstname() {
return firstname;
}
- public void setOrigin(Origin origin) {
- this.origin = origin;
+ public void setFirstname(Firstname firstname) {
+ this.firstname = firstname;
}
public Origin getOrigin() {
return origin;
}
- public void setCountry(Country country) {
- this.country = country;
+ public void setOrigin(Origin origin) {
+ this.origin = origin;
}
public Country getCountry() {
return country;
}
- public void setPersonSize(Size size) {
- this.size = size;
+ public void setCountry(Country country) {
+ this.country = country;
}
public Size getPersonSize() {
return size;
}
- public void setWeight(Weight weight) {
- this.weight = weight;
+ public void setPersonSize(Size size) {
+ this.size = size;
}
public Weight getWeight() {
return weight;
}
- public void setEye(Eye eye) {
- this.eye = eye;
+ public void setWeight(Weight weight) {
+ this.weight = weight;
}
public Eye getEye() {
return eye;
}
- public void setDistanceFromReference(Integer distanceFromReference) {
- this.distanceFromReference = distanceFromReference;
+ public void setEye(Eye eye) {
+ this.eye = eye;
}
public Integer getDistanceFromReference() {
return distanceFromReference;
}
+ public void setDistanceFromReference(Integer distanceFromReference) {
+ this.distanceFromReference = distanceFromReference;
+ }
+
@Override
public String toString() {
return "Person{" +
}
}
- public void setContentText(String contentText) {
- this.contentText = contentText;
- }
-
public String getContentText() {
return contentText;
}
+ public void setContentText(String contentText) {
+ this.contentText = contentText;
+ }
+
//FIXME: redraw on resizing
/*@Override
public void paint(Graphics g) {
g2d.setColor(personObj.getEye().getColor());
g2d.fillOval(50, 50, 6, 3);
g2d.fillOval(62, 50, 6, 3);
- // Weigth
+ // Weight
g2d.setColor(Color.black);
g2d.fillOval(44, 80, 30, (personObj.getWeight().getWeight() * 30) / 250);
}
add(new JScrollPane(tree));
}
- public static DefaultMutableTreeNode sortTree(DefaultMutableTreeNode root) {
+ private void sortTree(DefaultMutableTreeNode root) {
{
for (int i = 0; i < root.getChildCount() - 1; i++) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) root.getChildAt(i);
}
}
if (node.getChildCount() > 0) {
- sortTree(node);
+ this.sortTree(node);
}
}
- return root;
}
}
return tree;
}
- public void setRegionObj(Region regionObj) {
- this.regionObj = regionObj;
- }
-
public Region getRegionObj() {
return regionObj;
}
+
+ public void setRegionObj(Region regionObj) {
+ this.regionObj = regionObj;
+ }
}