| 1 | |
package org.jtheque.films.view.impl.actions.auto.choice; |
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
import org.jtheque.core.managers.Managers; |
| 20 | |
import org.jtheque.core.managers.beans.IBeansManager; |
| 21 | |
import org.jtheque.core.managers.view.impl.actions.JThequeAction; |
| 22 | |
import org.jtheque.films.controllers.able.IAutoAddController; |
| 23 | |
import org.jtheque.films.services.impl.utils.EditArguments; |
| 24 | |
import org.jtheque.films.view.able.IChoiceFieldsView; |
| 25 | |
|
| 26 | |
import javax.annotation.Resource; |
| 27 | |
import java.awt.event.ActionEvent; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
public final class AcValidateChoiceFieldsView extends JThequeAction { |
| 35 | |
@Resource |
| 36 | |
private IAutoAddController autoAddController; |
| 37 | |
|
| 38 | |
@Resource |
| 39 | |
private IChoiceFieldsView choiceFieldsView; |
| 40 | |
|
| 41 | |
|
| 42 | |
|
| 43 | |
|
| 44 | |
public AcValidateChoiceFieldsView() { |
| 45 | 0 | super("generic.view.actions.validate"); |
| 46 | |
|
| 47 | 0 | Managers.getManager(IBeansManager.class).inject(this); |
| 48 | 0 | } |
| 49 | |
|
| 50 | |
@Override |
| 51 | |
public void actionPerformed(ActionEvent event) { |
| 52 | 0 | EditArguments args = new EditArguments(); |
| 53 | |
|
| 54 | 0 | args.setEditActors(choiceFieldsView.isBoxActorsSelected()); |
| 55 | 0 | args.setEditDuration(choiceFieldsView.isBoxDurationSelected()); |
| 56 | 0 | args.setEditImage(choiceFieldsView.isBoxImageSelected()); |
| 57 | 0 | args.setEditKind(choiceFieldsView.isBoxKindSelected()); |
| 58 | 0 | args.setEditRealizer(choiceFieldsView.isBoxRealizerSelected()); |
| 59 | 0 | args.setEditYear(choiceFieldsView.isBoxYearSelected()); |
| 60 | 0 | args.isEditResume(choiceFieldsView.isBoxResumeSelected()); |
| 61 | |
|
| 62 | 0 | autoAddController.setFields(args); |
| 63 | 0 | autoAddController.displayView(); |
| 64 | |
|
| 65 | 0 | choiceFieldsView.closeDown(); |
| 66 | 0 | } |
| 67 | |
} |