125 "arrowwidth", "2",
126 "arrowcolor", DARK_GRAY,
127 // custom
128 "requiresMandatedColor", LIGHT_GRAY,
129 "javaSubgraphColor", ORANGE,
130 "jdkSubgraphColor", BLUE
131 );
132
133 final Map<String, Integer> weights = new HashMap<>();
134 final List<Set<String>> ranks = new ArrayList<>();
135 final Map<String, String> attrs;
136 ModuleGraphAttributes(Map<String, String> attrs) {
137 int h = 1000;
138 weight("java.se", "java.sql.rowset", h * 10);
139 weight("java.sql.rowset", "java.sql", h * 10);
140 weight("java.sql", "java.xml", h * 10);
141 weight("java.xml", "java.base", h * 10);
142
143 ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
144 ranks.add(Set.of("java.sql"));
145 ranks.add(Set.of("java.compiler", "java.instrument"));
146 ranks.add(Set.of("java.desktop", "java.management"));
147
148 this.attrs = attrs;
149 }
150
151 ModuleGraphAttributes() {
152 this(DEFAULT_ATTRIBUTES);
153 }
154 ModuleGraphAttributes(Properties props) {
155 this(toAttributes(props));
156 }
157
158 @Override
159 public double rankSep() {
160 return Double.valueOf(attrs.get("ranksep"));
161 }
162
163 @Override
164 public int fontSize() {
|
125 "arrowwidth", "2",
126 "arrowcolor", DARK_GRAY,
127 // custom
128 "requiresMandatedColor", LIGHT_GRAY,
129 "javaSubgraphColor", ORANGE,
130 "jdkSubgraphColor", BLUE
131 );
132
133 final Map<String, Integer> weights = new HashMap<>();
134 final List<Set<String>> ranks = new ArrayList<>();
135 final Map<String, String> attrs;
136 ModuleGraphAttributes(Map<String, String> attrs) {
137 int h = 1000;
138 weight("java.se", "java.sql.rowset", h * 10);
139 weight("java.sql.rowset", "java.sql", h * 10);
140 weight("java.sql", "java.xml", h * 10);
141 weight("java.xml", "java.base", h * 10);
142
143 ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
144 ranks.add(Set.of("java.sql"));
145 ranks.add(Set.of("java.transaction.xa"));
146 ranks.add(Set.of("java.compiler", "java.instrument"));
147 ranks.add(Set.of("java.desktop", "java.management"));
148
149 this.attrs = attrs;
150 }
151
152 ModuleGraphAttributes() {
153 this(DEFAULT_ATTRIBUTES);
154 }
155 ModuleGraphAttributes(Properties props) {
156 this(toAttributes(props));
157 }
158
159 @Override
160 public double rankSep() {
161 return Double.valueOf(attrs.get("ranksep"));
162 }
163
164 @Override
165 public int fontSize() {
|