Color arrowColor; if (isEnabled()) arrowColor = darkShadow;
int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0;  if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y);  switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1] + 1; x2 = xPoints[2] - 1; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor();  if (isEnabled) { g.setColor(Color.DARK_GRAY);  if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); }
  public void paintTriangle(Graphics g, int x, int y, int size, int direction,                            boolean isEnabled)  {    Polygon arrow = getArrow(direction, size);    arrowIcon arrowI = new arrowIcon(arrow);    arrowI.setSize(size);    Color arrowColor;    if (isEnabled())      arrowColor = darkShadow;    else      arrowColor = shadow;    arrowI.paintIconImpl(g, x, y, arrowColor);  }