Exemplo n.º 1
0
 @SuppressWarnings("unchecked")
 @Override
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == btn_OK) {
     eventAnimationList.clear();
     try {
       eventAnimationList = (List<Animations>) DeepCopier.deepCopy(tmpEventAnimationList);
       for (int i = 0; i < eventAnimationList.size(); i++) {
         eventAnimationList.get(i).recoveryBufImg();
       }
     } catch (Exception e1) {
       e1.printStackTrace();
     }
     this.dispose();
   } else if (e.getSource() == btn_cancel) {
     this.dispose();
   } else if (e.getSource() == btn_set) {
     int index = cb_indexEventAni.getSelectedIndex();
     new SetAnimationDlg(owner, tmpEventAnimationList.get(index));
   }
 }
Exemplo n.º 2
0
  @SuppressWarnings("unchecked")
  public EventAniDlg(MainFrame parent, String dlgName, List<Animations> dataList) {
    super(parent, dlgName);
    eventAnimationList = dataList;

    // 임시 이미지 저장 공간에 dataList의 데이터를 값복사하여 넣는다.
    // OK 버튼이 클릭되면 tmpEventAnimationList의 데이터가 eventAnimationList에 저장된다.
    try {
      tmpEventAnimationList = (List<Animations>) DeepCopier.deepCopy(eventAnimationList);
      for (int i = 0; i < tmpEventAnimationList.size(); i++) {
        tmpEventAnimationList.get(i).recoveryBufImg();
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    setSize(new Dimension(600, 700));
    setResizable(false);
    initComponents();
    setVisible(true);
    setModal(true);
  }