Package java.awt

Examples of java.awt.Paint


        }

        props.setProperty(LPC_LINEWIDTH,
                Integer.toString((int) ((BasicStroke) omGraphic.getStroke()).getLineWidth()));

        Paint paint = omGraphic.getLinePaint();
        if (paint instanceof Color) {
            props.setProperty(LPC_LINECOLOR,
                    ColorFactory.getHexColorString((Color) paint));
        }
View Full Code Here


        String paintString = props.getProperty(propertyKey);
        if (paintString == null) {
            paintString = props.getProperty(Environment.BackgroundColor);
        }

        Paint ret = null;
        if (paintString != null) {
            try {
                ret = PropUtils.parseColor(paintString);
            } catch (NumberFormatException nfe) {
                // Color set to white below...
View Full Code Here

    /**
     * render points
     */
    protected void renderPoints(Graphics g) {
        Paint pointPaint = getLabelPaint();

        for (Iterator it = points.iterator(); it.hasNext();) {
            OMPoint point = (OMPoint) it.next();
            point.setLinePaint(pointPaint);
            point.setFillPaint(pointPaint);
View Full Code Here

    /**
     * render labels
     */
    protected void renderLabels(Graphics g) {
        Font f = getFont();
        Paint labelPaint = getLabelPaint();
        Paint mattingPaint = getMattingPaint();
        boolean isMatted = isMatted();
        for (Iterator it = labels.iterator(); it.hasNext();) {
            OMText text = (OMText) it.next();
            text.setFont(f);
            text.setLinePaint(labelPaint);
View Full Code Here

        }

        pixels = new int[nPixels];

        // Init colors.
        Paint paint = getDisplayPaint();
        if (paint instanceof Color) {
            foreground = ((Color) paint).getRGB();
        } else {
            foreground = Color.black.getRGB();
        }
View Full Code Here

        checkFormat(requestProperties, parameters);
        setFormatter(parameters.formatter);

        checkBackground(requestProperties, parameters);
        Paint bgPaint = parameters.background;

        checkProjectionType(requestProperties, parameters);
        checkBoundingBox(requestProperties, parameters);
        Proj projection = createProjection(requestProperties, parameters);
       
View Full Code Here

    public static Paint getBackground(Properties props, Paint defPaint) {
        boolean transparent = PropUtils.booleanFromProperties(props,
                TRANSPARENT,
                false);

        Paint backgroundColor = PropUtils.parseColorFromProperties(props,
                BGCOLOR,
                defPaint);
       
        if (backgroundColor == null) {
            backgroundColor = Color.white;
        }

        if (transparent) {
            if (backgroundColor instanceof Color) {
                Color bgc = (Color) backgroundColor;
                backgroundColor = new Color(bgc.getRed(), bgc.getGreen(), bgc.getBlue(), 0x00);
            } else {
                backgroundColor = OMColor.clear;
            }
        }

        if (Debug.debugging("imageserver")) {
            Debug.output("ImageServerUtils.createOMProjection: projection color: "
                    + (backgroundColor instanceof Color ? Integer.toHexString(((Color) backgroundColor).getRGB())
                            : backgroundColor.toString())
                    + ", transparent("
                    + transparent + ")");
        }

        return backgroundColor;
View Full Code Here

        return map;
    }

    public void actionPerformed(ActionEvent ae) {
        if (map != null) {
            Paint newPaint = OMColorChooser.showDialog(this,
                    getText(),
                    map.getBackground());
            if (newPaint != null) {

                String colorString = Integer.toString(((java.awt.Color) newPaint).getRGB());
View Full Code Here

        return stroke;
    }

    public Paint getPaint(String paintProperty, String defaultPaintString) {
        Paint paint = null;

        String paintKey = "paint" + getProperty(paintProperty);

        if (paintProperty != null) {
            paint = (Paint) renderAttributesCache.get(paintKey);
View Full Code Here

        return paint;
    }

    public Paint getFillPaint() {

        Paint fillPaint = getPaint(LPC_FILLCOLOR, CLEAR_COLOR_STRING);
        String fillPatternString = getProperty(LPC_FILLPATTERN);

        if (fillPatternString == null
                || fillPatternString.equalsIgnoreCase(LPC_SOLID_PATTERN)) {
            return fillPaint;
View Full Code Here

TOP

Related Classes of java.awt.Paint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.