MCPcopy Index your code
hub / github.com/processing/processing / getStyle

Method getStyle

app/src/processing/app/Mode.java:854–872  ·  view source on GitHub ↗
(String attribute)

Source from the content-addressed store, hash-verified

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) {

Callers 3

PdeTextAreaDefaultsMethod · 0.45
getMonoFontListMethod · 0.45
nextPageMethod · 0.45

Calls 3

getMethod · 0.95
nextTokenMethod · 0.80
parseIntMethod · 0.80

Tested by

no test coverage detected