|
|
@@ -212,15 +212,6 @@ public class ActDialogPanel extends JDialog{
|
|
|
this.beginTime = new JTextField();
|
|
|
this.endTime = new JTextField();
|
|
|
|
|
|
- if(this.act == null){
|
|
|
- this.beginTime.setText("2015-10-11-08-10");
|
|
|
- this.endTime.setText("2015-10-11-12-20");
|
|
|
- }else{
|
|
|
- this.beginTime.setText(this.act.getActTime().getBeginTimeString2());
|
|
|
- this.endTime.setText(this.act.getActTime().getEndTimeString2());
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
JPanel time = new JPanel();
|
|
|
time.setLayout(new BoxLayout(time, BoxLayout.Y_AXIS));
|
|
|
|
|
|
@@ -236,6 +227,17 @@ public class ActDialogPanel extends JDialog{
|
|
|
|
|
|
time.add(begin);
|
|
|
time.add(end);
|
|
|
+
|
|
|
+ if(this.act == null){
|
|
|
+ System.out.println("default txt.");
|
|
|
+ this.beginTime.setText("2015-10-11-08-10");
|
|
|
+ this.endTime.setText("2015-10-11-12-20");
|
|
|
+ }else{
|
|
|
+ System.out.println("non txt.");
|
|
|
+
|
|
|
+ this.beginTime.setText(this.act.getActTime().getBeginTimeString2());
|
|
|
+ this.endTime.setText(this.act.getActTime().getEndTimeString2());
|
|
|
+ }
|
|
|
return time;
|
|
|
}
|
|
|
|
|
|
@@ -287,7 +289,7 @@ public class ActDialogPanel extends JDialog{
|
|
|
|
|
|
|
|
|
if(this.act == null){
|
|
|
- Act act = new Act(this.name.getText(), (Stage) this.stageComboBox.getSelectedItem(), this.genre.getText(), new ActTime("2015-10-11-08-10" ,"2015-10-11-12-20"), artists);
|
|
|
+ Act act = new Act(this.name.getText(), (Stage) this.stageComboBox.getSelectedItem(), this.genre.getText(), new ActTime(this.beginTime.getText() ,this.endTime.getText()), artists);
|
|
|
this.model.addElement(act);
|
|
|
this.agenda.addAct(act);
|
|
|
}else{
|
|
|
@@ -295,6 +297,7 @@ public class ActDialogPanel extends JDialog{
|
|
|
this.act.setGenre(this.genre.getText());
|
|
|
this.act.setStage((Stage) this.stageComboBox.getSelectedItem());
|
|
|
this.act.setArtists(artists);
|
|
|
+ this.act.setActTime(new ActTime(this.beginTime.getText() ,this.endTime.getText()));
|
|
|
this.model.removeElement(this.act);
|
|
|
this.model.addElement(act);
|
|
|
}
|