| | |
| | | import javax.swing.filechooser.FileNameExtensionFilter; |
| | | import javax.swing.plaf.FontUIResource; |
| | | |
| | | import org.springframework.core.io.Resource; |
| | | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
| | | import org.springframework.core.io.support.ResourcePatternResolver; |
| | | |
| | | import com.vci.client.ui.excel.ExcelFileOperation; |
| | | import com.vci.client.ui.swing.components.VCIJButton; |
| | | import com.vci.client.ui.swing.components.VCIJLabel; |
| | | import com.vci.client.ui.swing.components.VCIJMenuItem; |
| | | import com.vci.client.ui.swing.components.VCIJOptionPane; |
| | | import com.vci.client.utils.excel.ExcelFileOperation; |
| | | |
| | | import edu.stanford.smi.protege.util.LookAndFeelUtil; |
| | | |
| | |
| | | |
| | | public static String[] getImages() { |
| | | try { |
| | | ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); |
| | | //ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); |
| | | |
| | | Resource[] resources = resourceResolver.getResources("resource/images/*.*"); |
| | | //Resource[] resources = resourceResolver.getResources("resource/images/*.*"); |
| | | |
| | | String path = "resource/images/*.*"; |
| | | Enumeration<?> urlEnumeration = VCISwingUtil.class.getClassLoader().getResources(path); |
| | | List<String> lstImage = new ArrayList<String>(); |
| | | for (int i = 0; i < resources.length; i++) { |
| | | String name = resources[i].getFilename(); |
| | | while (urlEnumeration.hasMoreElements()) { |
| | | URL url = (URL)urlEnumeration.nextElement(); |
| | | File file = new File(url.toString()); |
| | | String name = file.getName(); |
| | | lstImage.add(name); |
| | | } |
| | | |
| | | // for (int i = 0; i < resources.length; i++) { |
| | | // String name = resources[i].getFilename(); |
| | | // lstImage.add(name); |
| | | // } |
| | | |
| | | return lstImage.toArray(new String[0]); |
| | | |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return new String[0]; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * <p>Description: </p> |