/**
  * @param storage
  * @param propertyName
  */
 public void storeDialogPositions(
     JDialog dialog, WindowConfigurationStorage storage, String propertyName) {
   storage.setX((dialog.getX()));
   storage.setY((dialog.getY()));
   storage.setWidth((dialog.getWidth()));
   storage.setHeight((dialog.getHeight()));
   String marshalled = marshall(storage);
   setProperty(propertyName, marshalled);
 }
Esempio n. 2
0
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == addbt) {
     if (bankAccountBLService != null) {
       JDialog dialog = new JDialog(parent, "新建银行账户", true);
       dialog
           .getContentPane()
           .add(new BankAccountAddPanel(parent, dialog, this, bankAccountBLService));
       dialog.setLocationRelativeTo(parent);
       dialog.setLocation(dialog.getX() / 2, dialog.getY() / 2);
       dialog.pack();
       dialog.setVisible(true);
     } else {
       initBL();
     }
   } else if (e.getSource() == deletebt) {
     int row = table.getSelectedRow();
     if (row >= 0) {
       if (bankAccountBLService != null) {
         String account = (String) table.getValueAt(row, 0);
         try {
           bankAccountBLService.deleteBankAccount(account);
           refresh();
           new TranslucentFrame(this, MessageType.DELETE_SUCCESS, Color.GREEN);
         } catch (RemoteException e1) {
           new TranslucentFrame(this, MessageType.RMI_LAG, Color.ORANGE);
         } catch (SQLException e1) {
           System.out.println(e1.getMessage());
         }
       } else {
         initBL();
       }
     }
   } else if (e.getSource() == refreshbt) {
     refresh();
     new TranslucentFrame(this, "刷新成功", Color.GREEN);
   }
 }