Java 类com.intellij.ui.DrawUtil 实例源码

项目:intellij-ce-playground    文件:CalloutComponent.java   
protected void paintComponent(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  final Object old = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

  g.setColor(getFillColor());
  g.fillRect(1, 1, getWidth() - 2, getHeight() - 2);

  DrawUtil.drawRoundRect(g, 0, 0, getWidth() - 1, getHeight() - 1, getBoundsColor());

  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, old);
}
项目:tools-idea    文件:CalloutComponent.java   
protected void paintComponent(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  final Object old = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

  g.setColor(getFillColor());
  g.fillRect(1, 1, getWidth() - 2, getHeight() - 2);

  DrawUtil.drawRoundRect(g, 0, 0, getWidth() - 1, getHeight() - 1, getBoundsColor());

  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, old);
}
项目:consulo    文件:CalloutComponent.java   
protected void paintComponent(Graphics g) {
  Graphics2D g2 = (Graphics2D) g;

  final Object old = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

  g.setColor(getFillColor());
  g.fillRect(1, 1, getWidth() - 2, getHeight() - 2);

  DrawUtil.drawRoundRect(g, 0, 0, getWidth() - 1, getHeight() - 1, getBoundsColor());

  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, old);
}