MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / paint

Method paint

ij/src/main/java/ij/gui/ColorChooser.java:107–119  ·  view source on GitHub ↗
(Graphics g)

Source from the content-addressed store, hash-verified

105 }
106
107 public void paint(Graphics g) {
108 g.setColor(c);
109 g.fillRect(0, 0, width, height);
110 int intensity = (c.getRed()+c.getGreen()+c.getBlue())/3;
111 Color c2 = intensity<128?Color.white:Color.black;
112 g.setColor(c2);
113 g.setFont(font);
114 Java2.setAntialiasedText(g, true);
115 String s = Colors.colorToString(c);
116 g.drawString(s, 5, height-5);
117 g.setColor(Color.black);
118 g.drawRect(0, 0, width-1, height-1);
119 }
120
121}

Callers

nothing calls this directly

Calls 10

setAntialiasedTextMethod · 0.95
colorToStringMethod · 0.95
fillRectMethod · 0.80
getRedMethod · 0.80
getGreenMethod · 0.80
getBlueMethod · 0.80
drawRectMethod · 0.80
setColorMethod · 0.65
setFontMethod · 0.65
drawStringMethod · 0.45

Tested by

no test coverage detected