📄 uiconstants.java
字号:
protected static String getNightlyBuildWarningJMVerNodePath(String variablePath) { return UI_ROOT + variablePath + NIGHTLY_BUILD_WARNING_JM_VER_NODE; } protected static boolean getDefaultNightlyBuildWarningEnabled() { return Boolean.parseBoolean(default_values.get(NIGHTLY_BUILD_WARNING_ID + ENABLED).toString()); } protected static String getDefaultNightlyBuildWarningJMVer() { return default_values.get(NIGHTLY_BUILD_WARNING_JM_VER_ID + VERSION).toString(); } // end NightlyBuildWarning methods // Connect at startup methods protected static boolean getDefaultConnectAtStartup() { return Boolean.parseBoolean(default_values.get(CONNECT_AT_STARTUP_ID + ENABLED).toString()); } protected static String getConnectAtStartupNodePath(String variablePath) { return UI_ROOT + variablePath + CONNECT_AT_STARTUP_NODE; } // end connect at startup methods // Column methods protected static String getColumnNodePath(String variablePath, int columnID) { return UI_ROOT + variablePath + getColumnNodeById(columnID); } public static int getDefaultColumnOrder(int columnID) { return Integer.parseInt(default_values.get(columnID + ORDER).toString()); } protected static boolean getDefaultColumnVisibility(int columnID) { return Boolean.parseBoolean(default_values.get(columnID + VISIBILITY).toString()); } protected static int getDefaultColumnWidth(int columnID) { return Integer.parseInt(default_values.get(columnID + WIDTH).toString()); } // end column methods private static Map<String,String> icon_name_by_extension = new Hashtable<String,String>(); static { icon_name_by_extension.put("rar","mimetypes/archive.png"); icon_name_by_extension.put("zip","mimetypes/archive.png"); icon_name_by_extension.put("tar","mimetypes/archive.png"); icon_name_by_extension.put("gz","mimetypes/archive.png"); icon_name_by_extension.put("7z","mimetypes/archive.png"); icon_name_by_extension.put("mp3","mimetypes/audio.png"); icon_name_by_extension.put("wav","mimetypes/audio.png"); icon_name_by_extension.put("midi","mimetypes/audio.png"); icon_name_by_extension.put("iso","mimetypes/cd_image.png"); icon_name_by_extension.put("nrg","mimetypes/cd_image.png"); icon_name_by_extension.put("cue","mimetypes/cd_image.png"); icon_name_by_extension.put("png","mimetypes/image.png"); icon_name_by_extension.put("jpg","mimetypes/image.png"); icon_name_by_extension.put("jpeg","mimetypes/image.png"); icon_name_by_extension.put("gif","mimetypes/image.png"); icon_name_by_extension.put("bmp","mimetypes/image.png"); icon_name_by_extension.put("ico","mimetypes/image.png"); icon_name_by_extension.put("pdf","mimetypes/pdf.png"); icon_name_by_extension.put("doc","mimetypes/doc.png"); icon_name_by_extension.put("wri","mimetypes/doc.png"); icon_name_by_extension.put("odt","mimetypes/doc.png"); icon_name_by_extension.put("sxw","mimetypes/doc.png"); icon_name_by_extension.put("vor","mimetypes/doc.png"); icon_name_by_extension.put("xls","mimetypes/calc.png"); icon_name_by_extension.put("exe", "mimetypes/windows_exe.png"); icon_name_by_extension.put("com", "mimetypes/windows_exe.png"); icon_name_by_extension.put("bat", "mimetypes/windows_exe.png"); icon_name_by_extension.put("cmd", "mimetypes/windows_exe.png"); icon_name_by_extension.put("so", "mimetypes/executable.png"); icon_name_by_extension.put("bin", "mimetypes/executable.png"); icon_name_by_extension.put("sh", "mimetypes/executable.png"); icon_name_by_extension.put("mpg", "mimetypes/video.png"); icon_name_by_extension.put("mpeg", "mimetypes/video.png"); icon_name_by_extension.put("avi", "mimetypes/video.png"); icon_name_by_extension.put("wmv", "mimetypes/video.png"); icon_name_by_extension.put("bik", "mimetypes/video.png"); icon_name_by_extension.put("mov", "mimetypes/video.png"); } public static final String INFINITY_STRING = "\u221E"; // "oo"; public static final int INFINITY_AS_INT = 31536000; // seconds (365days) public static InputStream getIconByExtension(String extension) { extension = extension.toLowerCase(); String image_path = icon_name_by_extension.get(extension); if (image_path == null) image_path = "mimetypes/default.png"; return UIImageRepository.getImageAsStream(image_path); } public static URL getMimeURLByExtension(String extension) { extension = extension.toLowerCase(); URL url = null; String file_name = icon_name_by_extension.get(extension); if(file_name != null) url = UIConstants.class. getClassLoader(). getResource("org/jmule/ui/resources/" + icon_name_by_extension.get(extension)); else url = UIConstants.class. getClassLoader(). getResource("org/jmule/ui/resources/mimetypes/default.png"); return url; } public static final String GNU_LICENSE = " GNU GENERAL PUBLIC LICENSE"+ "\n Version 2, June 1991"+ "\n"+ "\n Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"+ "\n Everyone is permitted to copy and distribute verbatim copies"+ "\n of this license document, but changing it is not allowed."+ "\n"+ "\n Preamble"+ "\n"+ "\n The licenses for most software are designed to take away your"+ "\nfreedom to share and change it. By contrast, the GNU General Public"+ "\nLicense is intended to guarantee your freedom to share and change free"+ "\nsoftware--to make sure the software is free for all its users. This"+ "\nGeneral Public License applies to most of the Free Software"+ "\nFoundation's software and to any other program whose authors commit to"+ "\nusing it. (Some other Free Software Foundation software is covered by"+ "\nthe GNU Library General Public License instead.) You can apply it to"+ "\nyour programs, too."+ "\n"+ "\n When we speak of free software, we are referring to freedom, not"+ "\nprice. Our General Public Licenses are designed to make sure that you"+ "\nhave the freedom to distribute copies of free software (and charge for"+ "\nthis service if you wish), that you receive source code or can get it"+ "\nif you want it, that you can change the software or use pieces of it"+ "\nin new free programs; and that you know you can do these things."+ "\n"+ "\n To protect your rights, we need to make restrictions that forbid"+ "\nanyone to deny you these rights or to ask you to surrender the rights."+ "\nThese restrictions translate to certain responsibilities for you if you"+ "\ndistribute copies of the software, or if you modify it."+ "\n"+ "\n For example, if you distribute copies of such a program, whether"+ "\ngratis or for a fee, you must give the recipients all the rights that"+ "\nyou have. You must make sure that they, too, receive or can get the"+ "\nsource code. And you must show them these terms so they know their"+ "\nrights."+ "\n"+ "\n We protect your rights with two steps: (1) copyright the software, and"+ "\n(2) offer you this license which gives you legal permission to copy,"+ "\ndistribute and/or modify the software."+ "\n"+ "\n Also, for each author's protection and ours, we want to make certain"+ "\nthat everyone understands that there is no warranty for this free"+ "\nsoftware. If the software is modified by someone else and passed on, we"+ "\nwant its recipients to know that what they have is not the original, so"+ "\nthat any problems introduced by others will not reflect on the original"+ "\nauthors' reputations."+ "\n"+ "\n Finally, any free program is threatened constantly by software"+ "\npatents. We wish to avoid the danger that redistributors of a free"+ "\nprogram will individually obtain patent licenses, in effect making the"+ "\nprogram proprietary. To prevent this, we have made it clear that any"+ "\npatent must be licensed for everyone's free use or not licensed at all."+ "\n"+ "\n The precise terms and conditions for copying, distribution and"+ "\nmodification follow."+ "\n"+ "\n GNU GENERAL PUBLIC LICENSE"+ "\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION"+ "\n"+ "\n 0. This License applies to any program or other work which contains"+ "\na notice placed by the copyright holder saying it may be distributed"+ "\nunder the terms of this General Public License. The \"Program\", below,"+ "\nrefers to any such program or work, and a \"work based on the Program\""+ "\nmeans either the Program or any derivative work under copyright law:"+ "\nthat is to say, a work containing the Program or a portion of it,"+ "\neither verbatim or with modifications and/or translated into another"+ "\nlanguage. (Hereinafter, translation is included without limitation in"+ "\nthe term \"modification\".) Each licensee is addressed as \"you\"."+ "\n"+ "\nActivities other than copying, distribution and modification are not"+ "\ncovered by this License; they are outside its scope. The act of"+ "\nrunning the Program is not restricted, and the output from the Program"+ "\nis covered only if its contents constitute a work based on the"+ "\nProgram (independent of having been made by running the Program)."+ "\nWhether that is true depends on what the Program does."+ "\n"+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -