@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); try { EntityActionIcon.setupAlpha(c, g2); entityIcon.paintIcon(c, g2, x + 1, y + 1); int addCrossLegLength = 2; int xC = x + entityIcon.getIconWidth() + addCrossLegLength; int yC = y + 4; g2.setStroke(EntityActionIcon.ACTION_STROKE); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); g2.setColor(entityIcon.getEntityColor()); g2.drawLine(xC - addCrossLegLength, yC, xC + addCrossLegLength, yC); g2.drawLine(xC, yC - addCrossLegLength, xC, yC + addCrossLegLength); } finally { g2.dispose(); } }
@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); try { EntityActionIcon.setupAlpha(c, g2); entityIcon.paintIcon(c, g2, x + 1, y + 1); int addCrossLegLength = 2; int xC = x + entityIcon.getIconWidth() + addCrossLegLength; int yC = y + 4; g2.setStroke(EntityActionIcon.ACTION_STROKE); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); g2.setColor(entityIcon.getEntityColor()); g2.drawLine(xC - addCrossLegLength, yC, xC + addCrossLegLength, yC); g2.drawLine(xC, yC - addCrossLegLength, xC, yC + addCrossLegLength); } finally { g2.dispose(); } }
int childCY = y + (iconHeight * 3) / 4; g2.setColor(entityIcon.getEntityColor());
int childCY = y + (iconHeight * 3) / 4; g2.setColor(entityIcon.getEntityColor());
@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); EntityActionIcon.setupAlpha(c, g2); try { int halfWidth = getIconWidth() / 2; int xC = halfWidth + x; int halfHeight = getIconHeight() / 2; int yC = halfHeight + y; entityIcon.paintIcon(c, g2, xC - (entityIcon.getIconWidth() / 2), yC - (entityIcon.getIconHeight() / 2)); g2.setStroke(EntityActionIcon.ACTION_STROKE); g2.setColor(entityIcon.getEntityColor()); int crossLegLen = 7; g2.drawLine(xC - crossLegLen, yC - crossLegLen, xC + crossLegLen, yC + crossLegLen); g2.drawLine(xC - crossLegLen, yC + crossLegLen, xC + crossLegLen, yC - crossLegLen); } finally { g2.dispose(); } }
@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); EntityActionIcon.setupAlpha(c, g2); try { int halfWidth = getIconWidth() / 2; int xC = halfWidth + x; int halfHeight = getIconHeight() / 2; int yC = halfHeight + y; entityIcon.paintIcon(c, g2, xC - (entityIcon.getIconWidth() / 2), yC - (entityIcon.getIconHeight() / 2)); g2.setStroke(EntityActionIcon.ACTION_STROKE); g2.setColor(entityIcon.getEntityColor()); int crossLegLen = 7; g2.drawLine(xC - crossLegLen, yC - crossLegLen, xC + crossLegLen, yC + crossLegLen); g2.drawLine(xC - crossLegLen, yC + crossLegLen, xC + crossLegLen, yC - crossLegLen); } finally { g2.dispose(); } }
int cy1 = y + getIconHeight() * 3 / 4; g2.setColor(entityIcon.getEntityColor());
int cy1 = y + getIconHeight() * 3 / 4; g2.setColor(entityIcon.getEntityColor());