RRRRHHHH_Code
Diff Revisions
578bec ...
vs
ad3773 ...
for ruralHouses client/src/gui/ModifyHouseGUI.java
|
@@ -6,6 +6,7 @@ |
6 |
6 |
|
import java.awt.event.ItemListener; |
7 |
7 |
|
import java.rmi.Naming; |
8 |
8 |
|
import java.rmi.RemoteException; |
|
9 |
+ |
import java.util.Vector; |
9 |
10 |
|
|
10 |
11 |
|
import javax.swing.DefaultComboBoxModel; |
11 |
12 |
|
import javax.swing.JButton; |
|
@@ -18,7 +19,6 @@ |
18 |
19 |
|
import javax.swing.border.EmptyBorder; |
19 |
20 |
|
|
20 |
21 |
|
import common.HouseInterface; |
21 |
|
- |
|
22 |
22 |
|
import configuration.___IntNames; |
23 |
23 |
|
import domain.Districs; |
24 |
24 |
|
import domain.HouseFeatures; |
|
@@ -159,8 +159,22 @@ |
159 |
159 |
|
|
160 |
160 |
|
} |
161 |
161 |
|
}); |
162 |
|
- |
|
163 |
|
- |
houseBox = new JComboBox<RuralHouse>(o.getRuralHouses()); |
|
162 |
+ |
HouseInterface hm= null; |
|
163 |
+ |
try { |
|
164 |
+ |
hm = (HouseInterface) Naming |
|
165 |
+ |
.lookup(___IntNames.HouseManager); |
|
166 |
+ |
} catch (Exception e1) { |
|
167 |
+ |
System.out.println("Error accessing remote authentication: " |
|
168 |
+ |
+ e1.toString()); |
|
169 |
+ |
} |
|
170 |
+ |
Vector<RuralHouse> list = null; |
|
171 |
+ |
try { |
|
172 |
+ |
list = hm.getHouses(o, null, null, 0, 0, 0, 0, 0); |
|
173 |
+ |
} catch (RemoteException e1) { |
|
174 |
+ |
e1.printStackTrace(); |
|
175 |
+ |
} |
|
176 |
+ |
|
|
177 |
+ |
houseBox = new JComboBox<RuralHouse>(list); |
164 |
178 |
|
if (!o.getRuralHouses().isEmpty()) { |
165 |
179 |
|
rh = (RuralHouse) houseBox.getSelectedItem(); |
166 |
180 |
|
comboBox.setSelectedItem(rh.getDistrict()); |