Ejemplo n.º 1
0
 public int showDialog(Component parent) {
   parentDialog = new JXDialog(this);
   parentDialog.setTitle("New media (" + categories + ")");
   parentDialog.setContentPane(this);
   parentDialog.setModal(true);
   parentDialog.setMinimumSize(new Dimension(300, 300));
   // dialog.setPreferredSize(new Dimension(500,400));
   parentDialog.setDefaultCloseOperation(JXDialog.DISPOSE_ON_CLOSE);
   GKit.popup(parent, parentDialog);
   return selectedOption;
 }
Ejemplo n.º 2
0
 public void actionPerformed(ActionEvent e) {
   if (okButton.getActionCommand().equalsIgnoreCase(e.getActionCommand())) {
     selectedOption = ERROR_STATUS;
     IMedia media = createMedia((ICategory) catBox.getSelectedItem());
     if (media != null) {
       selectedOption = OK;
       if (parentDialog != null) {
         parentDialog.setVisible(false);
       }
     }
   } else {
     selectedOption = CANCEL;
     if (parentDialog != null) {
       parentDialog.setVisible(false);
     }
   }
 }
Ejemplo n.º 3
0
 public static int showCreateDialog(
     Component parent, List<ICategory> category, String initialName, String format) {
   MediaCreator mcd = new MediaCreator(category, initialName, format);
   JXDialog dialog = new JXDialog(mcd);
   mcd.parentDialog = dialog;
   // ============== le dialog
   dialog.setTitle("New media (" + category + ")");
   dialog.setContentPane(mcd);
   dialog.setModal(true);
   dialog.setMinimumSize(new Dimension(300, 300));
   // dialog.setPreferredSize(new Dimension(500,400));
   dialog.setDefaultCloseOperation(JXDialog.DISPOSE_ON_CLOSE);
   GKit.popup(dialog);
   return mcd.selectedOption;
 }