mixconfig.panels.PriceCertPanel Class Reference

Inherits javax::swing::JPanel, java::awt::event::ActionListener, and javax::swing::event::ChangeListener.

List of all members.

Public Member Functions

 PriceCertPanel (String name, String toolTip, XMLPriceCertificate priceCert)
void actionPerformed (ActionEvent a_e)
void removeCert ()
XMLPriceCertificate getCert ()
void setCert (byte[] a_cert)
void setCert (XMLPriceCertificate a_cert)
void setEnabled (boolean enabled)
void stateChanged (ChangeEvent event)
void addChangeListener (ChangeListener a_listener)

Static Public Attributes

static final String XMLPATH_PRICECERT = PaymentPanel.XMLPATH_ACCOUNTING+"/"+XMLPriceCertificate.XML_ELEMENT_NAME

Private Member Functions

boolean importCert () throws IOException
void showPrice (XMLPriceCertificate a_cert)
String formatEuroCentValue (double centvalue)
void clearPrice ()
void showError (String sMessage, String sToolTip)
void enableButtons ()
void checkIDs ()
void fireStateChanged ()

Private Attributes

XMLPriceCertificate m_cert
Vector< ChangeListener > m_changeListeners = new Vector<ChangeListener>()
JButton m_bttnImport
JButton m_bttnUpdate
JButton m_bttnRemove
JLabel m_rate

Static Private Attributes

static final String MSG_CHOOSE_IMPORT_METHOD = PriceCertPanel.class.getName()+"_chooseImportMethod"
static final String MSG_CONFIRM_DELETION = PriceCertPanel.class.getName() + "_confirmDeletion"

Classes

class  ChooseImportMethodPane


Detailed Description

JPanel-representation of a XMLPriceCertificate:

Load and Store a price certificate as part of a MixConfiguration

Author:
Elmar Schraml

Johannes Renner


Constructor & Destructor Documentation

mixconfig.panels.PriceCertPanel.PriceCertPanel ( String  name,
String  toolTip,
XMLPriceCertificate  priceCert 
)


Member Function Documentation

void mixconfig.panels.PriceCertPanel.actionPerformed ( ActionEvent  a_e  ) 

boolean mixconfig.panels.PriceCertPanel.importCert (  )  throws IOException [private]

Import an X.509 public certificate. The user is prompted to give the name of a file from which to import. If that fails, the user is prompted to paste the certificate from the system clipboard.

Returns:
True if certificate was imported successful; False otherwise
Exceptions:
IOException If an error occurs while reading the certificate.

References mixconfig.panels.PriceCertPanel.ChooseImportMethodPane.isMethodFile(), mixconfig.panels.PriceCertPanel.m_cert, mixconfig.panels.PriceCertPanel.MSG_CHOOSE_IMPORT_METHOD, and mixconfig.panels.PriceCertPanel.setCert().

Referenced by mixconfig.panels.PriceCertPanel.actionPerformed().

void mixconfig.panels.PriceCertPanel.removeCert (  ) 

XMLPriceCertificate mixconfig.panels.PriceCertPanel.getCert (  ) 

Return the price certificate that is currently maintained by this JPanel

Returns:

References mixconfig.panels.PriceCertPanel.m_cert.

void mixconfig.panels.PriceCertPanel.setCert ( byte[]  a_cert  ) 

Create and set the price certificate from a given byte array

Parameters:
a_cert 

References mixconfig.panels.PriceCertPanel.m_cert, and mixconfig.panels.PriceCertPanel.showPrice().

Referenced by mixconfig.panels.PriceCertPanel.importCert().

void mixconfig.panels.PriceCertPanel.setCert ( XMLPriceCertificate  a_cert  ) 

Set a given XMLPriceCertificate to this panel

Parameters:
a_cert 

References mixconfig.panels.PriceCertPanel.m_cert, and mixconfig.panels.PriceCertPanel.showPrice().

void mixconfig.panels.PriceCertPanel.showPrice ( XMLPriceCertificate  a_cert  )  [private]

String mixconfig.panels.PriceCertPanel.formatEuroCentValue ( double  centvalue  )  [private]

Return a string representation of the price per megabyte

Parameters:
centvalue 
Returns:

Referenced by mixconfig.panels.PriceCertPanel.showPrice().

void mixconfig.panels.PriceCertPanel.clearPrice (  )  [private]

void mixconfig.panels.PriceCertPanel.showError ( String  sMessage,
String  sToolTip 
) [private]

void mixconfig.panels.PriceCertPanel.setEnabled ( boolean  enabled  ) 

void mixconfig.panels.PriceCertPanel.enableButtons (  )  [private]

Enables/disables the buttons according to this object's state. The buttons for creating and importing certificates are enabled if the stored certificate is null. Otherwise, the buttons for exporting and removing the certificate and for changing the password are enabled.

References mixconfig.panels.PriceCertPanel.m_bttnImport, mixconfig.panels.PriceCertPanel.m_bttnRemove, mixconfig.panels.PriceCertPanel.m_bttnUpdate, and mixconfig.panels.PriceCertPanel.m_cert.

Referenced by mixconfig.panels.PriceCertPanel.actionPerformed(), and mixconfig.panels.PriceCertPanel.setEnabled().

void mixconfig.panels.PriceCertPanel.checkIDs (  )  [private]

void mixconfig.panels.PriceCertPanel.stateChanged ( ChangeEvent  event  ) 

void mixconfig.panels.PriceCertPanel.addChangeListener ( ChangeListener  a_listener  ) 

void mixconfig.panels.PriceCertPanel.fireStateChanged (  )  [private]


Member Data Documentation

final String mixconfig.panels.PriceCertPanel.XMLPATH_PRICECERT = PaymentPanel.XMLPATH_ACCOUNTING+"/"+XMLPriceCertificate.XML_ELEMENT_NAME [static]

final String mixconfig.panels.PriceCertPanel.MSG_CHOOSE_IMPORT_METHOD = PriceCertPanel.class.getName()+"_chooseImportMethod" [static, private]

final String mixconfig.panels.PriceCertPanel.MSG_CONFIRM_DELETION = PriceCertPanel.class.getName() + "_confirmDeletion" [static, private]

XMLPriceCertificate mixconfig.panels.PriceCertPanel.m_cert [private]

Vector<ChangeListener> mixconfig.panels.PriceCertPanel.m_changeListeners = new Vector<ChangeListener>() [private]


The documentation for this class was generated from the following file:

Generated on Mon Nov 16 23:24:48 2009 for MixConfig by  doxygen 1.5.6