]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Moved to jcore
authorRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 07:06:01 +0000 (09:06 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 07:09:18 +0000 (09:09 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
Addressbook/src/org/mxchange/addressbook/client/gui/ClientFrame.java [deleted file]
Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java
Addressbook/src/org/mxchange/addressbook/model/contact/ContactTableModel.java [deleted file]

index 244c73f266f34ac0b93d872f406245ce9822c6fa..a34a6d8cf298490a40724a4447120b032f5ebaa7 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.addressbook.client.gui;
 
+import org.mxchange.jcore.client.gui.ClientFrame;
 import java.awt.BorderLayout;
 import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
@@ -48,11 +49,11 @@ import org.mxchange.addressbook.BaseAddressbookSystem;
 import org.mxchange.addressbook.application.AddressbookApplication;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
 import org.mxchange.addressbook.manager.contact.ManageableAddressbookContact;
-import org.mxchange.addressbook.model.contact.ContactTableModel;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.Gender;
 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
+import org.mxchange.jcore.model.swing.contact.ContactTableModel;
 
 /**
  *
diff --git a/Addressbook/src/org/mxchange/addressbook/client/gui/ClientFrame.java b/Addressbook/src/org/mxchange/addressbook/client/gui/ClientFrame.java
deleted file mode 100644 (file)
index cd36ca0..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.client.gui;
-
-import org.mxchange.jcore.FrameworkInterface;
-import org.mxchange.jcore.client.Client;
-import org.mxchange.jcore.contact.Contact;
-import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
-
-/**
- * An interface for applications with a frame
- *
- * @author Roland Haeder
- */
-public interface ClientFrame extends FrameworkInterface {
-
-       /**
-        * Shows the user the "add contact" form with some special text
-        * 
-        * @return Contact instance
-        */
-       public Contact doEnterOwnData ();
-
-       /**
-        * Shutdown this frame
-        */
-       public void doShutdown ();
-
-       /**
-        * Enables main window (frame)
-        */
-       public void enableMainWindow ();
-
-       /**
-        * Setups the frame (and starts it). You have to call init() before you can
-        * call this method.
-        *
-        * @param client Client instance
-        */
-       public void setupFrame (final Client client);
-
-       /**
-        * Initializes frame
-        *
-        * @throws
-        * org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
-        * this method has been called twice
-        */
-       public void init () throws FrameAlreadyInitializedException;
-
-       /**
-        * Returns field isInitialized. This flag indicates whether this frame has
-        * been initialized or not.
-        *
-        * @return Field isInitialized
-        */
-       public boolean isInitialized ();
-
-       /**
-        * Shuts down application
-        */
-       public void shutdownApplication ();
-}
index e43e5acbb74804190ae3bfd384f60b108b018a17..be62260e3ad3660d7b7869e6a2d8abd270e7b0bb 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.addressbook.client.gui;
 
+import org.mxchange.jcore.client.gui.ClientFrame;
 import org.mxchange.addressbook.client.AddressbookClient;
 import org.mxchange.addressbook.client.BaseAddressbookClient;
 import org.mxchange.addressbook.menu.Menu;
diff --git a/Addressbook/src/org/mxchange/addressbook/model/contact/ContactTableModel.java b/Addressbook/src/org/mxchange/addressbook/model/contact/ContactTableModel.java
deleted file mode 100644 (file)
index 5446a83..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.model.contact;
-
-import java.text.MessageFormat;
-import javax.swing.table.TableModel;
-import org.mxchange.jcore.client.Client;
-import org.mxchange.jcore.manager.database.ManageableDatabase;
-import org.mxchange.jcore.model.BaseModel;
-
-/**
- * A table model for contacts
- *
- * @author Roland Haeder
- */
-public class ContactTableModel extends BaseModel implements TableModel {
-
-       /**
-        * Constructor with Client instance which holds the contact manager
-        *
-        * @param client Client instance
-        */
-       public ContactTableModel (final Client client) {
-               // Trace message
-               this.getLogger().trace(MessageFormat.format("client={1} - CALLED!", client)); //NOI18N
-
-               // Client must not be null
-               if (client == null)  {
-                       // Abort here
-                       throw new NullPointerException("client is null"); //NOI18N
-               }
-
-               // Set client
-               this.setClient(client);
-       }
-
-       @Override
-       public Class<?> getColumnClass (final int columnIndex) {
-               // All is the same
-               return Object.class;
-       }
-
-       @Override
-       public int getColumnCount () {
-               // Get manager
-               ManageableDatabase manager = (ManageableDatabase) this.getClient().getManager();
-
-               // Deligate this call to contact manager
-               return manager.getColumnCount();
-       }
-
-       @Override
-       public String getColumnName (final int columnIndex) {
-               // Get manager
-               ManageableDatabase manager = (ManageableDatabase) this.getClient().getManager();
-
-               // Deligate this call to contact manager
-               return manager.getTranslatedColumnName(columnIndex);
-       }
-
-       @Override
-       public int getRowCount () {
-               // Get manager
-               ManageableDatabase manager = (ManageableDatabase) this.getClient().getManager();
-
-               // Deligate this call to contact manager
-               return manager.size();
-       }
-
-       @Override
-       public Object getValueAt (final int rowIndex, final int columnIndex) {
-               // Get manager
-               ManageableDatabase manager = (ManageableDatabase) this.getClient().getManager();
-
-               // Deligate this call to contact manager
-               return manager.getValueFromRowColumn(rowIndex, columnIndex);
-       }
-
-       @Override
-       public boolean isCellEditable (final int rowIndex, final int columnIndex) {
-               throw new UnsupportedOperationException("Not supported yet. rowIndex=" + rowIndex + ",columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.
-       }
-
-       @Override
-       public void setValueAt (final Object value, final int rowIndex, final int columnIndex) {
-               throw new UnsupportedOperationException("Not supported yet. value=" + value + ",rowIndex=" + rowIndex + ",columnIndex=" + columnIndex); //To change body of generated methods, choose Tools | Templates.
-       }
-}