DOCUMENT ME!

@param g      DOCUMENT ME!
@param width  DOCUMENT ME!
@param height DOCUMENT ME!
763392
private void paintBorderEnabled(Graphics2D g, int width, int height) {
        Shape   s;
        s = shapeGenerator.createRoundRectangle(0, 0, width - 1, height - 1, CornerSize.BORDER);
        g.setPaint(borderColor);
        g.draw(s);
    }
60246
function(width, height) {
            this.width = width;
            this.height = height;
            for (var i = 0; i < this.width; i++) {
                if(!this.data){
                    this.data = [];
                }

                if(this.data[i] === void 0){
                    this.data[i] = [];
                }
            }
        }
541465
public final void init(final int WIDTH, final int HEIGHT) {
        if (WIDTH <= 1 || HEIGHT <= 1) {
            return;
        }

        if (lcdImage != null) {
            lcdImage.flush();
        }
        lcdImage = create_LCD_Image(WIDTH, HEIGHT);

        if (glowImageOn != null) {
            glowImageOn.flush();
        }
        glowImageOn = GlowImageFactory.INSTANCE.createLcdGlow(WIDTH, HEIGHT, glowColor, true);

        final double CORNER_RADIUS = WIDTH > HEIGHT ? (HEIGHT * 0.095) : (WIDTH * 0.095);
        disabledShape = new RoundRectangle2D.Double(0, 0, WIDTH, HEIGHT, CORNER_RADIUS, CORNER_RADIUS);
        if (isDigitalFont()) {
            lcdValueFont = LCD_DIGITAL_FONT.deriveFont(0.5f * getInnerBounds().height);
            lcdFormerValueFont = LCD_DIGITAL_FONT.deriveFont(0.2f * getInnerBounds().height);
            if (useCustomLcdUnitFont) {
                lcdUnitFont = customLcdUnitFont.deriveFont(0.1875f * getInnerBounds().height);
            } else {
                lcdUnitFont = LCD_STANDARD_FONT.deriveFont(0.1875f * getInnerBounds().height);
            }
        } else {
            lcdValueFont = LCD_STANDARD_FONT.deriveFont(0.46875f * getInnerBounds().height);
            lcdFormerValueFont = LCD_STANDARD_FONT.deriveFont(0.1875f * getInnerBounds().height);
            if (useCustomLcdUnitFont) {
                lcdUnitFont = customLcdUnitFont.deriveFont(0.1875f * getInnerBounds().height);
            } else {
                lcdUnitFont = LCD_STANDARD_FONT.deriveFont(0.1875f * getInnerBounds().height);
            }
        }
        lcdInfoFont = LCD_STANDARD_FONT.deriveFont(0.15f * getInnerBounds().height);

        if (lcdThresholdImage != null) {
            lcdThresholdImage.flush();
        }
        lcdThresholdImage = create_LCD_THRESHOLD_Image((int) (HEIGHT * 0.2045454545), (int) (HEIGHT * 0.2045454545), lcdColor.TEXT_COLOR);
    }
1205286
public void setDimension(int width, int height) {
        setWidth(String.valueOf(width));
        setHeight(String.valueOf(height));
        reload();
    }
989192
@Override
    public final AbstractGauge init(final int WIDTH, final int HEIGHT) {
        final int GAUGE_WIDTH = isFrameVisible() ? WIDTH : getGaugeBounds().width;
        final int GAUGE_HEIGHT = isFrameVisible() ? HEIGHT : getGaugeBounds().height;

        if (GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1) {
            return this;
        }

        if (!isFrameVisible()) {
            setFramelessOffset(-getGaugeBounds().width * 0.0841121495, -getGaugeBounds().width * 0.0841121495);
        } else {
            setFramelessOffset(getGaugeBounds().x, getGaugeBounds().y);
        }

        // Create Background Image
        if (bImage != null) {
            bImage.flush();
        }
        bImage = UTIL.createImage(GAUGE_WIDTH, GAUGE_WIDTH, Transparency.TRANSLUCENT);

        // Create Foreground Image
        if (fImage != null) {
            fImage.flush();
        }
        fImage = UTIL.createImage(GAUGE_WIDTH, GAUGE_WIDTH, Transparency.TRANSLUCENT);

        if (isFrameVisible()) {
            create_FRAME_Image(GAUGE_WIDTH, bImage);
        }

        if (isBackgroundVisible()) {
            create_BACKGROUND_Image(GAUGE_WIDTH, bImage);
        }

        if (isGlowVisible()) {
            if (glowImageOff != null) {
                glowImageOff.flush();
            }
            glowImageOff = create_GLOW_Image(GAUGE_WIDTH, getGlowColor(), false);
            if (glowImageOn != null) {
                glowImageOn.flush();
            }
            glowImageOn = create_GLOW_Image(GAUGE_WIDTH, getGlowColor(), true);
        } else {
            setGlowPulsating(false);
        }

        final double TRACK_ORIENTATION_OFFSET;
        switch (getOrientation()) {
            case NORTH_EAST:
                TRACK_ORIENTATION_OFFSET = Math.PI / 2;
                TRACK_OFFSET.setLocation(-(GAUGE_WIDTH / 1.55), 0);
                break;
            case SOUTH_EAST:
                TRACK_ORIENTATION_OFFSET = Math.PI;
                TRACK_OFFSET.setLocation(-(GAUGE_WIDTH / 1.55), -(GAUGE_WIDTH / 1.55));
                break;
            case SOUTH_WEST:
                TRACK_ORIENTATION_OFFSET = 1.5 * Math.PI;
                TRACK_OFFSET.setLocation(0, -(GAUGE_WIDTH / 1.55));
                break;
            case NORTH_WEST:

            default:
                TRACK_ORIENTATION_OFFSET = 0;
                TRACK_OFFSET.setLocation(0, 0);
                break;
        }

        if (isTrackVisible()) {
            create_TRACK_Image(GAUGE_WIDTH, getModel().getFreeAreaAngle(), TICKMARK_ROTATION_OFFSET + TRACK_ORIENTATION_OFFSET, getMinValue(), getMaxValue(), getAngleStep(), getTrackStart(), getTrackSection(), getTrackStop(), getTrackStartColor(), getTrackSectionColor(), getTrackStopColor(), 0.68f, new Point2D.Double(GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH * 0.8271028037), getTickmarkDirection(), TRACK_OFFSET, bImage);
        }

        if (!getAreas().isEmpty()){
            createAreas(bImage);
        }

        if (!getSections().isEmpty()) {
            createSections(bImage);
        }

        //final double TICKMARKS_ORIENTATION_OFFSET;
        switch (getOrientation()) {
            case NORTH_EAST:
                //TICKMARKS_ORIENTATION_OFFSET = Math.PI / 2;
                TICKMARKS_OFFSET.setLocation(-(GAUGE_WIDTH / 1.55), 0);
                //tickLabelRotationOffset = 0;
                break;
            case SOUTH_EAST:
                //TICKMARKS_ORIENTATION_OFFSET = Math.PI;
                TICKMARKS_OFFSET.setLocation(-(GAUGE_WIDTH / 1.55), -(GAUGE_WIDTH / 1.55));
                //tickLabelRotationOffset = Math.PI;
                break;
            case SOUTH_WEST:
                //TICKMARKS_ORIENTATION_OFFSET = 1.5 * Math.PI;
                TICKMARKS_OFFSET.setLocation(0, -(GAUGE_WIDTH / 1.55));
                //tickLabelRotationOffset = Math.PI;
                break;
            case NORTH_WEST:

            default:
                //TICKMARKS_ORIENTATION_OFFSET = 0;
                TICKMARKS_OFFSET.setLocation(0, 0);
                //tickLabelRotationOffset = 0;
                break;
        }

        TICKMARK_FACTORY.create_RADIAL_TICKMARKS_Image(GAUGE_WIDTH,
                                                       getModel().getNiceMinValue(),
                                                       getModel().getNiceMaxValue(),
                                                       getModel().getMaxNoOfMinorTicks(),
                                                       getModel().getMaxNoOfMajorTicks(),
                                                       getModel().getMinorTickSpacing(),
                                                       getModel().getMajorTickSpacing(),
                                                       getGaugeType(),
                                                       getCustomGaugeType(),
                                                       getMinorTickmarkType(),
                                                       getMajorTickmarkType(),
                                                       isTickmarksVisible(),
                                                       isTicklabelsVisible(),
                                                       getModel().isMinorTickmarksVisible(),
                                                       getModel().isMajorTickmarksVisible(),
                                                       getLabelNumberFormat(),
                                                       isTickmarkSectionsVisible(),
                                                       getBackgroundColor(),
                                                       getTickmarkColor(),
                                                       isTickmarkColorFromThemeEnabled(),
                                                       getTickmarkSections(),
                                                       isSectionTickmarksOnly(),
                                                       getSections(),
                                                       0.68f,
                                                       0.09f,
                                                       new Point2D.Double(GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH * 0.8271028037),
                                                       new Point2D.Double(0, 0),
                                                       Orientation.NORTH_WEST,
                                                       getModel().getTicklabelOrientation(),
                                                       getModel().isNiceScale(),
                                                       getModel().isLogScale(),
                                                       bImage);

        if (pointerImage != null) {
            pointerImage.flush();
        }
        pointerImage = create_POINTER_Image(GAUGE_WIDTH, getPointerType());

        if (pointerShadowImage != null) {
            pointerShadowImage.flush();
        }
        if (getModel().isPointerShadowVisible()) {
            pointerShadowImage = create_POINTER_SHADOW_Image(GAUGE_WIDTH, getPointerType());
        } else {
            pointerShadowImage = null;
        }

        create_POSTS_Image(GAUGE_WIDTH, fImage);

        if (isForegroundVisible()) {
            create_FOREGROUND_Image(GAUGE_WIDTH, fImage);
        }

        final double THRESHOLD_ORIENTATION_OFFSET;
        switch (getOrientation()) {
            case NORTH_EAST:
                THRESHOLD_ORIENTATION_OFFSET = Math.PI / 2;
                THRESHOLD_OFFSET.setLocation(bImage.getWidth() * 0.775, bImage.getHeight() * 0.81);
                if (!isLogScale()) {
                    thresholdRotationOffset = ROTATION_OFFSET + (getMaxValue() - getThreshold() - getMinValue()) * getAngleStep();
                } else {
                    thresholdRotationOffset = ROTATION_OFFSET + UTIL.logOfBase(BASE, getMaxValue() - getThreshold() - getMinValue()) * getLogAngleStep();
                }
                break;
            case SOUTH_EAST:
                THRESHOLD_ORIENTATION_OFFSET = Math.PI / 2;
                THRESHOLD_OFFSET.setLocation((bImage.getWidth() * 0.79), (bImage.getHeight() * 0.16));
                if (!isLogScale()) {
                    thresholdRotationOffset = Math.PI / 2 + ROTATION_OFFSET + (getMaxValue() - getThreshold() - getMinValue()) * getAngleStep();
                } else {
                    thresholdRotationOffset = Math.PI / 2 + ROTATION_OFFSET + UTIL.logOfBase(BASE, getMaxValue() - getThreshold() - getMinValue()) * getLogAngleStep();
                }
                break;
            case SOUTH_WEST:
                THRESHOLD_ORIENTATION_OFFSET = -Math.PI / 2;
                THRESHOLD_OFFSET.setLocation((bImage.getWidth() * 0.19), (bImage.getHeight() * 0.16));
                if (!isLogScale()) {
                    thresholdRotationOffset = ROTATION_OFFSET + (getThreshold() - getMinValue()) * getAngleStep();
                } else {
                    thresholdRotationOffset = ROTATION_OFFSET + UTIL.logOfBase(BASE, getThreshold() - getMinValue()) * getLogAngleStep();
                }
                break;
            case NORTH_WEST:

            default:
                THRESHOLD_ORIENTATION_OFFSET = 0;
                THRESHOLD_OFFSET.setLocation((bImage.getWidth() * 0.805), (bImage.getHeight() * 0.19));
                if (!isLogScale()) {
                    thresholdRotationOffset = ROTATION_OFFSET + (getThreshold() - getMinValue()) * getAngleStep();
                } else {
                    thresholdRotationOffset = ROTATION_OFFSET + UTIL.logOfBase(BASE, getThreshold() - getMinValue()) * getLogAngleStep();
                }
                break;
        }

        if (thresholdImage != null) {
            thresholdImage.flush();
        }
        thresholdImage = create_THRESHOLD_Image(GAUGE_WIDTH, THRESHOLD_ORIENTATION_OFFSET);

        final double MIN_MEASURED_ORIENTATION_OFFSET;
        switch (getOrientation()) {
            case NORTH_EAST:
                MIN_MEASURED_ORIENTATION_OFFSET = Math.PI / 2;
                measuredRotationOffset = ROTATION_OFFSET;
                MEASURED_OFFSET.setLocation(bImage.getWidth() * 0.87, bImage.getHeight() * 0.815);
                break;
            case SOUTH_EAST:
                MIN_MEASURED_ORIENTATION_OFFSET = Math.PI / 2;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.87), (bImage.getHeight() * 0.15));
                measuredRotationOffset = Math.PI / 2 + ROTATION_OFFSET;
                break;
            case SOUTH_WEST:
                MIN_MEASURED_ORIENTATION_OFFSET = -Math.PI / 2;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.10), (bImage.getHeight() * 0.16));
                measuredRotationOffset = ROTATION_OFFSET;
                break;
            case NORTH_WEST:

            default:
                MIN_MEASURED_ORIENTATION_OFFSET = 0;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.811), (bImage.getHeight() * 0.11));
                measuredRotationOffset = ROTATION_OFFSET;
                break;
        }
        if (minMeasuredImage != null) {
            minMeasuredImage.flush();
        }
        minMeasuredImage = create_MEASURED_VALUE_Image(GAUGE_WIDTH, new Color(0, 23, 252, 255), MIN_MEASURED_ORIENTATION_OFFSET);

        final double MAX_MEASURED_ORIENTATION_OFFSET;
        switch (getOrientation()) {
            case NORTH_EAST:
                MAX_MEASURED_ORIENTATION_OFFSET = Math.PI / 2;
                measuredRotationOffset = ROTATION_OFFSET;
                MEASURED_OFFSET.setLocation(bImage.getWidth() * 0.87, bImage.getHeight() * 0.815);
                break;
            case SOUTH_EAST:
                MAX_MEASURED_ORIENTATION_OFFSET = Math.PI / 2;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.87), (bImage.getHeight() * 0.15));
                measuredRotationOffset = Math.PI / 2 + ROTATION_OFFSET;
                break;
            case SOUTH_WEST:
                MAX_MEASURED_ORIENTATION_OFFSET = -Math.PI / 2;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.10), (bImage.getHeight() * 0.16));
                measuredRotationOffset = ROTATION_OFFSET;
                break;
            case NORTH_WEST:

            default:
                MAX_MEASURED_ORIENTATION_OFFSET = 0;
                MEASURED_OFFSET.setLocation((bImage.getWidth() * 0.811), (bImage.getHeight() * 0.11));
                measuredRotationOffset = ROTATION_OFFSET;
                break;
        }
        if (maxMeasuredImage != null) {
            maxMeasuredImage.flush();
        }
        maxMeasuredImage = create_MEASURED_VALUE_Image(GAUGE_WIDTH, new Color(252, 29, 0, 255), MAX_MEASURED_ORIENTATION_OFFSET);

        if (disabledImage != null) {
            disabledImage.flush();
        }
        disabledImage = create_DISABLED_Image(GAUGE_WIDTH);

        // Adjust the rotation center of the pointer
        switch (getOrientation()) {
            case NORTH_EAST:
                ROTATION_CENTER.setLocation(GAUGE_WIDTH - GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH * 0.8271028037);
                titleOffsetYFactor = 0.6f;
                unitOffsetYFactor = 0.67f;
                break;
            case SOUTH_EAST:
                ROTATION_CENTER.setLocation(GAUGE_WIDTH - GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH - GAUGE_WIDTH * 0.8271028037);
                titleOffsetYFactor = 0.3f;
                unitOffsetYFactor = 0.37f;
                break;
            case SOUTH_WEST:
                ROTATION_CENTER.setLocation(GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH - GAUGE_WIDTH * 0.8271028037);
                titleOffsetYFactor = 0.3f;
                unitOffsetYFactor = 0.37f;
                break;
            case NORTH_WEST:

            default:
                ROTATION_CENTER.setLocation(GAUGE_WIDTH * 0.8271028037, GAUGE_WIDTH * 0.8271028037);
                titleOffsetYFactor = 0.6f;
                unitOffsetYFactor = 0.67f;
                break;
        }

        setCurrentLedImage(getLedImageOff());

        return this;
    }
967923
function (x, y, width, height) {
            var glPoints = this._glPoints;
            glPoints[0].x = x + width;
            glPoints[0].y = y;
            glPoints[1].x = x;
            glPoints[1].y = y;
            glPoints[2].x = x + width;
            glPoints[2].y = y + height;
            glPoints[3].x = x;
            glPoints[3].y = y + height;
            this.compositor.drawTriangle(glPoints, 4, true);
        }
140481
public void setPixelSize(int width, int height) {
		layerHtmlContainer.setPixelSize(width, height);
		drawingArea.setWidth(width);
		drawingArea.setHeight(height);
		canvasPanel.setPixelSize(width, height);
		for (CanvasContainer container : worldCanvases) {
			container.setPixelSize(width, height);
		}
		super.setPixelSize(width, height);
	}
319693
public void paint (Graphics g, int x, int y, int width, int height)
    {
        // bail out now if we were passed a bogus source image at construct time
        if (_tiles == null) {
            return;
        }

        int rwid = width-2*_w3, rhei = height-2*_h3;

        g.drawImage(_tiles[0], x, y, _w3, _h3, null);
        g.drawImage(_tiles[1], x + _w3, y, rwid, _h3, null);
        g.drawImage(_tiles[2], x + _w3 + rwid, y, _w3, _h3, null);

        y += _h3;
        g.drawImage(_tiles[3], x, y, _w3, rhei, null);
        g.drawImage(_tiles[4], x + _w3, y, rwid, rhei, null);
        g.drawImage(_tiles[5], x + _w3 + rwid, y, _w3, rhei, null);

        y += rhei;
        g.drawImage(_tiles[6], x, y, _w3, _h3, null);
        g.drawImage(_tiles[7], x + _w3, y, rwid, _h3, null);
        g.drawImage(_tiles[8], x + _w3 + rwid, y, _w3, _h3, null);
    }
120726
@Override
    public final AbstractGauge init(int WIDTH, int HEIGHT) {
        if (WIDTH <= 1 || HEIGHT <= 1) {
            return this;
        }

        if (isDigitalFont()) {
            setLcdValueFont(getModel().getDigitalBaseFont().deriveFont(0.7f * WIDTH * 0.10f));
        } else {
            setLcdValueFont(getModel().getStandardBaseFont().deriveFont(0.625f * WIDTH * 0.10f));
        }

        if (isCustomLcdUnitFontEnabled()) {
            setLcdUnitFont(getCustomLcdUnitFont().deriveFont(0.25f * WIDTH * 0.10f));
        } else {
            setLcdUnitFont(getModel().getStandardBaseFont().deriveFont(0.25f * WIDTH * 0.10f));
        }

        setLcdInfoFont(getModel().getStandardInfoFont().deriveFont(0.15f * WIDTH * 0.10f));

        CENTER.setLocation(getGaugeBounds().getCenterX() - getInsets().left, getGaugeBounds().getCenterY() - getInsets().top);

        if (frameImage != null) {
            frameImage.flush();
        }
        frameImage = create_FRAME_Image(WIDTH);

        if (backgroundImage != null) {
            backgroundImage.flush();
        }
        backgroundImage = create_BACKGROUND_Image(WIDTH);

        if (lcdImage != null) {
            lcdImage.flush();
        }
        lcdImage = create_LCD_Image((int) (WIDTH * 0.32), (int) (WIDTH * 0.10), getLcdColor(), getCustomLcdBackground());
        LCD.setRect(((getGaugeBounds().width - lcdImage.getWidth()) / 2.0), ((getGaugeBounds().height - lcdImage.getHeight()) / 2.0), WIDTH * 0.32, WIDTH * 0.10);

        if (tickmarksImage != null) {
            tickmarksImage.flush();
        }
        tickmarksImage = create_TICKMARKS_Image(WIDTH);

        if (overlayImage != null) {
            overlayImage.flush();
        }
        overlayImage = create_OVERLAY_Image(WIDTH);

        if (pointerImage != null) {
            pointerImage.flush();
        }
        pointerImage = create_POINTER_Image(WIDTH);

        if (foregroundImage != null) {
            foregroundImage.flush();
        }
        foregroundImage = create_FOREGROUND_Image(WIDTH, false, getForegroundType());

        if (disabledImage != null) {
            disabledImage.flush();
        }
        disabledImage = create_DISABLED_Image(WIDTH);

        return this;
    }
1136689
private BufferedImage createImage(final int WIDTH, final int HEIGHT, final int TRANSPARENCY) {
        final GraphicsConfiguration GFX_CONF = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
        if (WIDTH <= 0 || HEIGHT <= 0) {
            return GFX_CONF.createCompatibleImage(1, 1, TRANSPARENCY);
        }
        final BufferedImage IMAGE = GFX_CONF.createCompatibleImage(WIDTH, HEIGHT, TRANSPARENCY);
        return IMAGE;
    }
1245210
private void paintCloseHover(Graphics2D g, JComponent c, int width, int height) {
        paintClose(g, c, width, height, hover);
    }
1291488
private void paintMinimizeEnabled(Graphics2D g, JComponent c, int width, int height) {
        iconifyPainter.paintEnabled(g, c, width, height);
    }
617481
@Override
    public void setSize(float width, float height)
    {
        if (view != null)
        {
            view.setSize(width, height);
        }
    }
536324
void setDimens(int width, int height) {
        mAreDimensOverridden = true;
        mDesiredWidth = width;
        mDesiredHeight = height;
        requestLayout();
    }
204470
public void setSize(final int X, final int Y, final int WIDTH, final int HEIGHT) {
        bounds.setBounds(X, Y, WIDTH, HEIGHT);
        fireStateChanged();
    }
555441
public void update(final Graphics g) {
        final Dimension d = getSize();
        if ( (this.offScreenImage == null) ) {
            this.offScreenImage = createImage( d.width,
                                          d.height );
        }
        paint( this.offScreenImage.getGraphics() );
        g.drawImage( this.offScreenImage,
                     0,
                     0,
                     null );
    }
136197
private void paintCheckIconEnabledAndMouseOver(Graphics2D g, int width, int height) {
        g.setPaint(iconSelectedMouseOver);
        g.drawRoundRect(0, 1, width-1, height-2, 4, 4);
    }