Here you can find the source of getIcon(int index)
Parameter | Description |
---|---|
index | the index of the icon to get |
public static synchronized Icon getIcon(int index)
//package com.java2s; /************************************************************************* //from www . ja v a2 s. co m This file is part of Open ModelSphere HTML Reports Project. Open ModelSphere HTML Reports 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/. You can redistribute and/or modify this particular file even under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. You should have received a copy of the GNU Lesser General Public License (LGPL) along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/. You can contact us at : http://www.javaforge.com/project/3219 **********************************************************************/ import java.util.ArrayList; import javax.swing.Icon; public class Main { /** The list of icons */ private static ArrayList<Icon> icons; /** * This function returns the icon at a specific index * * @param index * the index of the icon to get * @return The icon at index */ public static synchronized Icon getIcon(int index) { if (index >= 0 && index < icons.size()) { return icons.get(index); } return null; } }