*/
package org.mxchange.jcoreswing.model;
-import java.text.MessageFormat;
import javax.swing.event.EventListenerList;
import javax.swing.event.ListDataListener;
import javax.swing.event.TableModelListener;
* Protected constructor
*/
protected BaseModel () {
- // Trace message
- this.getLogger().trace("CALLED!"); //NOI18N
-
// Init listener list
this.eventListenerList = new EventListenerList();
}
@Override
public void addListDataListener (final ListDataListener listener) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("listener={0}", listener)); //NOI18N
-
// Listener must not be null
if (null == listener) {
// Abort here
throw new NullPointerException("listener is null"); //NOI18N
}
- // Debug message
- this.getLogger().debug(MessageFormat.format("Adding listener {0} ...", listener.getClass())); //NOI18N
-
// Remove listener
this.eventListenerList.add(ListDataListener.class, listener);
-
- // Trace message
- this.getLogger().trace("EXIT!"); //NOI18N
}
@Override
public void addTableModelListener (final TableModelListener listener) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("listener={0}", listener)); //NOI18N
-
// Listener must not be null
if (null == listener) {
// Abort here
throw new NullPointerException("listener is null"); //NOI18N
}
- // Debug message
- this.getLogger().debug(MessageFormat.format("Adding listener {0} ...", listener.getClass())); //NOI18N
-
// Add listener
this.eventListenerList.add(TableModelListener.class, listener);
-
- // Trace message
- this.getLogger().trace("EXIT!"); //NOI18N
}
@Override
public void removeListDataListener (final ListDataListener listener) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("listener={0}", listener)); //NOI18N
-
// Listener must not be null
if (null == listener) {
// Abort here
throw new NullPointerException("listener is null"); //NOI18N
}
- // Debug message
- this.getLogger().debug(MessageFormat.format("Removing listener {0} ...", listener.getClass())); //NOI18N
-
// Remove listener
this.eventListenerList.remove(ListDataListener.class, listener);
-
- // Trace message
- this.getLogger().trace("EXIT!"); //NOI18N
}
@Override
public void removeTableModelListener (final TableModelListener listener) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("listener={0}", listener)); //NOI18N
-
// Listener must not be null
if (null == listener) {
// Abort here
throw new NullPointerException("listener is null"); //NOI18N
}
- // Debug message
- this.getLogger().debug(MessageFormat.format("Removing listener {0} ...", listener.getClass())); //NOI18N
-
// Remove listener
this.eventListenerList.remove(TableModelListener.class, listener);
-
- // Trace message
- this.getLogger().trace("EXIT!"); //NOI18N
}
}
*/
package org.mxchange.jcoreswing.model.swing.contact;
-import java.text.MessageFormat;
import javax.swing.table.TableModel;
import org.mxchange.jcore.manager.Manageable;
import org.mxchange.jcore.model.contact.Contact;
* @param manager Manageable instance
*/
public ContactTableModel (final Manageable manager) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("manager={1} - CALLED!", manager)); //NOI18N
-
// Manager must not be null
if (null == manager) {
// Abort here