MCPcopy Create free account
hub / github.com/PCGen/pcgen / paint

Method paint

code/src/java/pcgen/gui2/filter/FilterBar.java:163–195  ·  view source on GitHub ↗
(Graphics g)

Source from the content-addressed store, hash-verified

161 private static final int[] YDOWN = {4, 1, 1};
162
163 @Override
164 public void paint(Graphics g)
165 {
166 Color b;
167 Color f;
168 if (entered)
169 {
170 b = UIManager.getColor("controlDkShadow");
171 f = Color.BLACK;
172 }
173 else
174 {
175 b = UIManager.getColor("control");
176 f = UIManager.getColor("controlDkShadow");
177 }
178 g.setColor(b);
179 g.fillRect(0, 0, getWidth(), getHeight());
180 int center = getWidth() / 2;
181 int[] xs = {center, center - 3, center + 3};
182 int[] ys;
183 if (open)
184 {
185 ys = YUP;
186
187 }
188 else
189 {
190 ys = YDOWN;
191 }
192 g.setColor(f);
193 g.drawPolygon(xs, ys, 3);
194 g.fillPolygon(xs, ys, 3);
195 }
196
197 public void setOpen(boolean open)
198 {

Callers

nothing calls this directly

Calls 2

setColorMethod · 0.80
getColorMethod · 0.45

Tested by

no test coverage detected