import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.MessageFormat;
import javax.swing.BorderFactory;
import org.mxchange.jcore.contact.Contact;
import org.mxchange.jcore.contact.Gender;
import org.mxchange.jcore.exceptions.BadTokenException;
+import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
import org.mxchange.jcore.model.swing.contact.ContactTableModel;
// Debug line
this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
- // Get and cast manager instance
- ManageableAddressbookContact manager = (ManageableAddressbookContact) this.getClient().getManager();
-
// Has the user entered own data?
- if (manager.isOwnContactAdded()) {
+ if (((ManageableAddressbookContact) this.getClient().getManager()).isOwnContactAdded()) {
// Debug message
this.getLogger().debug("Disabling menus: isOwnContactAdded()=false"); //NOI18N
@Override
public void actionPerformed (final ActionEvent e) {
try {
- ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
- manager.doEnterOwnData();
+ ((ManageableAddressbookContact) self.getClient().getManager()).doEnterOwnData();
} catch (final ContactAlreadyAddedException ex) {
// Already added, log away
// @TODO maybe output message here?
*/
@Override
public void actionPerformed (final ActionEvent e) {
- ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
try {
- manager.doChangeOwnData();
- } catch (final IOException | BadTokenException ex) {
+ ((ManageableAddressbookContact) self.getClient().getManager()).doChangeOwnData();
+ } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
self.logException(ex);
}
}
*/
@Override
public void actionPerformed (final ActionEvent e) {
- ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
- manager.doAddOtherAddress();
+ ((ManageableAddressbookContact) self.getClient().getManager()).doAddOtherAddress();
}
});