Java Graphics Draw drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)

Here you can find the source of drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow, Color highlight, Color lightHighlight)

Description

draw Lowered Bezel

License

Open Source License

Declaration

public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow,
            Color highlight, Color lightHighlight) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;

import java.awt.Graphics;

public class Main {
    public static void drawLoweredBezel(Graphics g, int x, int y, int w, int h, Color shadow, Color darkShadow,
            Color highlight, Color lightHighlight) {
        g.setColor(darkShadow);//ww w  .j  av  a2  s.  com
        g.drawLine(0, 0, 0, h - 1);
        g.drawLine(1, 0, w - 2, 0);

        g.setColor(shadow);
        g.drawLine(1, 1, 1, h - 2);
        g.drawLine(1, 1, w - 3, 1);

        g.setColor(lightHighlight);
        g.drawLine(0, h - 1, w - 1, h - 1);
        g.drawLine(w - 1, h - 1, w - 1, 0);

        g.setColor(highlight);
        g.drawLine(1, h - 2, w - 2, h - 2);
        g.drawLine(w - 2, h - 2, w - 2, 1);
    }
}

Related

  1. drawHandles(final Graphics g, final int[] x, final int[] y)
  2. drawIcon(Graphics g, String icon, int x, int y)
  3. drawInnerButtonDecoration(Graphics g, int x, int y, int w, int h, Color baseColor)
  4. drawISPip(Graphics2D g2d, float width, float height)
  5. drawLightBeamVertical(Graphics g, Color c, int midx, int y1, int y2)
  6. drawMarker(Graphics2D g, int markerWidth, int markerHeight, Point location)
  7. drawMask(Graphics2D g2, Shape mask)
  8. drawMovingRect(int x, int y, int width, int height, Graphics g, int seed)
  9. drawOptimizedLine(Graphics g, int x1, int y1, int x2, int y2)