(String attribute)
| 852 | |
| 853 | |
| 854 | public SyntaxStyle getStyle(String attribute) { |
| 855 | String str = Preferences.get("editor.token." + attribute + ".style"); |
| 856 | if (str == null) { |
| 857 | throw new IllegalArgumentException("No style found for " + attribute); |
| 858 | } |
| 859 | |
| 860 | StringTokenizer st = new StringTokenizer(str, ","); |
| 861 | |
| 862 | String s = st.nextToken(); |
| 863 | if (s.indexOf("#") == 0) s = s.substring(1); |
| 864 | Color color = new Color(Integer.parseInt(s, 16)); |
| 865 | |
| 866 | s = st.nextToken(); |
| 867 | boolean bold = (s.indexOf("bold") != -1); |
| 868 | // boolean italic = (s.indexOf("italic") != -1); |
| 869 | |
| 870 | // return new SyntaxStyle(color, italic, bold); |
| 871 | return new SyntaxStyle(color, bold); |
| 872 | } |
| 873 | |
| 874 | |
| 875 | public Image makeGradient(String attribute, int wide, int high) { |
no test coverage detected