RRRRHHHH_Code
Diff Revisions
be3833 ...
vs
3db092 ...
for ruralHouses client/src/gui/ModifyOfferGUI.java
|
@@ -26,9 +26,9 @@ |
26 |
26 |
|
import javax.swing.JTextField; |
27 |
27 |
|
|
28 |
28 |
|
import com.toedter.calendar.JCalendar; |
|
29 |
+ |
|
29 |
30 |
|
import common.HouseInterface; |
30 |
31 |
|
import common.OfferInterface; |
31 |
|
- |
|
32 |
32 |
|
import configuration.___IntNames; |
33 |
33 |
|
import domain.Offer; |
34 |
34 |
|
import domain.Owner; |
|
@@ -252,7 +252,28 @@ |
252 |
252 |
|
} |
253 |
253 |
|
} |
254 |
254 |
|
}); |
255 |
|
- |
|
|
255 |
+ |
if(((Offer) comboBox_o.getSelectedItem()).isBooked()){ |
|
256 |
+ |
jLabel5.setText("This offer is already booked."); |
|
257 |
+ |
jButton1.setEnabled(false); |
|
258 |
+ |
} |
|
259 |
+ |
comboBox_o.addItemListener(new ItemListener() { |
|
260 |
+ |
@Override |
|
261 |
+ |
public void itemStateChanged(ItemEvent arg0) { |
|
262 |
+ |
if(((Offer) comboBox_o.getSelectedItem()).isBooked()){ |
|
263 |
+ |
jLabel5.setText("This offer is already booked."); |
|
264 |
+ |
jButton1.setEnabled(false); |
|
265 |
+ |
} |
|
266 |
+ |
} |
|
267 |
+ |
}); |
|
268 |
+ |
comboBox_o.addItemListener(new ItemListener() { |
|
269 |
+ |
@Override |
|
270 |
+ |
public void itemStateChanged(ItemEvent arg0) { |
|
271 |
+ |
if(!((Offer) comboBox_o.getSelectedItem()).isBooked()){ |
|
272 |
+ |
jLabel5.setText("");; |
|
273 |
+ |
jButton1.setEnabled(true); |
|
274 |
+ |
} |
|
275 |
+ |
} |
|
276 |
+ |
}); |
256 |
277 |
|
this.getContentPane().add(jCalendar2, null); |
257 |
278 |
|
this.getContentPane().add(jCalendar1, null); |
258 |
279 |
|
this.getContentPane().add(jLabel5, null); |