// Path: src/main/java/com/cipherdyne/utils/InternationalizationHelper.java
// public class InternationalizationHelper {
// 
//     static private ResourceBundle messages;
//     private static final Logger LOGGER = LogManager.getLogger(InternationalizationHelper.class.getName());
//     private static InternationalizationHelper instance = null;
// 
//     /**
//      * Hidden constructor
//      *
//      * @param language
//      * @param country
//      */
//     private InternationalizationHelper(final String language, final String country) {
// 
//         messages = ResourceBundle.getBundle("messages", new Locale(language, country));
//     }
// 
//     public static String getMessage(final String i18nKey) {
// 
//         String translation = i18nKey;
// 
//         if (instance == null) {
//             instance = new InternationalizationHelper("en", "EN");
//         }
// 
//         try {
//             translation = messages.getString(i18nKey);
//         } catch (final MissingResourceException e) {
//             LOGGER.warn("No translation found for key " + i18nKey);
//         }
// 
//         return translation;
//     }
// 
//     public static String getMessageOrNull(final String i18nKey) {
// 
//         String translation = null;
// 
//         if (instance == null) {
//             instance = new InternationalizationHelper("en", "EN");
//         }
// 
//         try {
//             translation = messages.getString(i18nKey);
//         } catch (final MissingResourceException e) {
// 
//         }
// 
//         return translation;
//     }
// 
//     public static void configure(final String locale) {
//         String[] localeArray = locale.split("_");
//         instance = new InternationalizationHelper(localeArray[0], localeArray[1]);
//     }
// }


import com.cipherdyne.utils.InternationalizationHelper;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import javax.swing.table.AbstractTableModel;
/*
 * JFwknop is developed primarily by the people listed in the file 'AUTHORS'.
 * Copyright (C) 2016 JFwknop developers and contributors.
 *
 * 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 2
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package com.cipherdyne.gui.ip;


/**
 * Table model used to list IPV4 or IPV6 addresses of the host
 */
public class IpTableModel extends AbstractTableModel {

    // Network interface is column 0 of the table model
    static public final int NETWORK_IFACE_COL_ID = 0;

    // IP address is column 1 of the table model
    static public final int IP_ADDRESS_COL_ID = 1;

    // Name of the available columns in the table model
    final private String[] columnNames = {
// Path: src/main/java/com/cipherdyne/utils/InternationalizationHelper.java
// public class InternationalizationHelper {
// 
//     static private ResourceBundle messages;
//     private static final Logger LOGGER = LogManager.getLogger(InternationalizationHelper.class.getName());
//     private static InternationalizationHelper instance = null;
// 
//     /**
//      * Hidden constructor
//      *
//      * @param language
//      * @param country
//      */
//     private InternationalizationHelper(final String language, final String country) {
// 
//         messages = ResourceBundle.getBundle("messages", new Locale(language, country));
//     }
// 
//     public static String getMessage(final String i18nKey) {
// 
//         String translation = i18nKey;
// 
//         if (instance == null) {
//             instance = new InternationalizationHelper("en", "EN");
//         }
// 
//         try {
//             translation = messages.getString(i18nKey);
//         } catch (final MissingResourceException e) {
//             LOGGER.warn("No translation found for key " + i18nKey);
//         }
// 
//         return translation;
//     }
// 
//     public static String getMessageOrNull(final String i18nKey) {
// 
//         String translation = null;
// 
//         if (instance == null) {
//             instance = new InternationalizationHelper("en", "EN");
//         }
// 
//         try {
//             translation = messages.getString(i18nKey);
//         } catch (final MissingResourceException e) {
// 
//         }
// 
//         return translation;
//     }
// 
//     public static void configure(final String locale) {
//         String[] localeArray = locale.split("_");
//         instance = new InternationalizationHelper(localeArray[0], localeArray[1]);
//     }
// }


// Path: src/main/java/com/cipherdyne/gui/ip/IpTableModel.java
import com.cipherdyne.utils.InternationalizationHelper;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import javax.swing.table.AbstractTableModel;

/*
 * JFwknop is developed primarily by the people listed in the file 'AUTHORS'.
 * Copyright (C) 2016 JFwknop developers and contributors.
 *
 * 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 2
 * 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package com.cipherdyne.gui.ip;


/**
 * Table model used to list IPV4 or IPV6 addresses of the host
 */
public class IpTableModel extends AbstractTableModel {

    // Network interface is column 0 of the table model
    static public final int NETWORK_IFACE_COL_ID = 0;

    // IP address is column 1 of the table model
    static public final int IP_ADDRESS_COL_ID = 1;

    // Name of the available columns in the table model
    final private String[] columnNames = {
        InternationalizationHelper.getMessage("i18n.network.interface.id"),