use of com.moneychanger.core.Contract in project otapij by FellowTraveler.
the class IssueAssetContractDialog method jButton1ActionPerformed.
// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
boolean success = new Contract().issueAssetType(jTextField2.getText(), jTextField1.getText(), contractString);
if (success) {
JOptionPane.showMessageDialog(this, "Asset issued successfully", "Issue Asset", JOptionPane.INFORMATION_MESSAGE);
MainPage.loadAccount(assetID, serverID, nymID);
// refresh
} else
JOptionPane.showMessageDialog(this, "Error in Asset issuence", "Asset Issuence Failure", JOptionPane.ERROR_MESSAGE);
} catch (Exception e) {
e.printStackTrace();
} finally {
setCursor(Cursor.getDefaultCursor());
}
this.dispose();
}
use of com.moneychanger.core.Contract in project otapij by FellowTraveler.
the class MainPage method refreshServerContractList.
private void refreshServerContractList() {
Contract contract = new Contract();
((ServerContractTableModel) jTable_ServerList.getModel()).setValue(contract.loadServerContract(), jTable_ServerList);
serverMap.clear();
serverMap = contract.loadServerContract();
System.out.println("serverv" + serverMap.entrySet());
Helpers.populateCombo(serverMap, jComboBoxServerContracts);
Helpers.populateComboWithoutAll(serverMap, jComboBox5);
}
use of com.moneychanger.core.Contract in project otapij by FellowTraveler.
the class AssetContractEditDialog method jButton1ActionPerformed.
// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton1ActionPerformed
boolean status = new Contract().editLabel(assetID, "Asset", jTextField1.getText());
if (status) {
JOptionPane.showMessageDialog(this, "Asset Contract edited successfully", "Edit Success", JOptionPane.INFORMATION_MESSAGE);
MainPage.setBasketAssetName(jTextField1.getText());
} else {
JOptionPane.showMessageDialog(this, "Asset Contract could not be edited", "Failure", JOptionPane.ERROR_MESSAGE);
}
this.dispose();
}
use of com.moneychanger.core.Contract in project otapij by FellowTraveler.
the class MainPage method jButton_RemoveAccount3ActionPerformed.
//GEN-LAST:event_jButton_EditAccount3ActionPerformed
private void jButton_RemoveAccount3ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton_RemoveAccount3ActionPerformed
if (jTable_ServerList.getSelectedRow() < 0) {
JOptionPane.showMessageDialog(this, "Please select Server Contract to delete", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
int userSelection = JOptionPane.showConfirmDialog(this, "Are you sure you want to delete Server Contract", "Server Contract Deletion", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
System.out.println("userSelection:" + userSelection);
Contract contract = new Contract();
if (userSelection == 0) {
boolean status = contract.deleteServerContract((String) jTable_ServerList.getModel().getValueAt(jTable_ServerList.getSelectedRow(), 1));
if (status) {
JOptionPane.showMessageDialog(this, "Server Contract deleted successfully", "Server Contract Deletion", JOptionPane.INFORMATION_MESSAGE);
refreshServerContractList();
} else {
JOptionPane.showMessageDialog(this, "Server Contract cannot be deleted", "Server Contract Deletion", JOptionPane.ERROR_MESSAGE);
}
}
}
use of com.moneychanger.core.Contract in project otapij by FellowTraveler.
the class MainPage method jButton_RemoveAccount2ActionPerformed.
//GEN-LAST:event_jButton_EditAccount2ActionPerformed
private void jButton_RemoveAccount2ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton_RemoveAccount2ActionPerformed
if (jTable_AssetList.getSelectedRow() < 0) {
JOptionPane.showMessageDialog(this, "Please select Asset Contract to delete", "Error", JOptionPane.ERROR_MESSAGE);
return;
}
int userSelection = JOptionPane.showConfirmDialog(this, "Are you sure you want to delete Asset Contract", "Asset Contract Deletion", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
System.out.println("userSelection:" + userSelection);
Contract contract = new Contract();
if (userSelection == 0) {
boolean status = contract.deleteAssetContract((String) jTable_AssetList.getModel().getValueAt(jTable_AssetList.getSelectedRow(), 1));
if (status) {
JOptionPane.showMessageDialog(this, "Asset Contract deleted successfully", "Asset Contract Deletion", JOptionPane.INFORMATION_MESSAGE);
refreshAssetContractList();
} else {
JOptionPane.showMessageDialog(this, "Asset Contract cannot be deleted", "Asset Contract Deletion", JOptionPane.ERROR_MESSAGE);
}
}
}
Aggregations