Java JList updatebandList(final JList bandList, final Map paramMap, final String paramName)

Here you can find the source of updatebandList(final JList bandList, final Map paramMap, final String paramName)

Description

updateband List

License

Open Source License

Declaration

@Deprecated
    public static void updatebandList(final JList bandList, final Map<String, Object> paramMap,
            final String paramName) 

Method Source Code


//package com.java2s;
/*//from w ww  . j a v a2 s . co m
 * Copyright (C) 2013 by Array Systems Computing Inc. http://www.array.ca
 *
 * 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/
 */

import javax.swing.*;

import java.util.List;
import java.util.Map;

public class Main {
    @Deprecated
    public static void updatebandList(final JList bandList, final Map<String, Object> paramMap,
            final String paramName) {
        updateParamList(bandList, paramMap, paramName);
    }

    public static void updateParamList(final JList paramList, final Map<String, Object> paramMap,
            final String paramName) {
        final List selectedValues = paramList.getSelectedValuesList();
        final String names[] = new String[selectedValues.size()];
        int i = 0;
        for (Object selectedValue : selectedValues) {
            names[i++] = (String) selectedValue;
        }
        paramMap.put(paramName, names);
    }
}

Related

  1. navigateThroughList(javax.swing.JList list, int keyCode)
  2. pickFirstIfNone(JList list)
  3. pointIsInActualBounds(JList list, int index, Point point)
  4. pointIsInActualBounds(JList list, int index, Point point)
  5. setErrorBackground(JList comp)
  6. updateList(JList list, LinkedHashMap map)