Package java.awt

Examples of java.awt.Paint


        if (scale <= 20000000f) {
            g.fillRect(0, 0, getWidth(), getHeight());
            return;
        }

        Paint oldPaint = null;
        if (g instanceof Graphics2D) {
            oldPaint = ((Graphics2D) g).getPaint();
        } else {
            oldPaint = g.getColor();
        }
View Full Code Here


     */
    public void setLinePaint(Paint lPaint) {
        if (lPaint == linePaint)
            return;

        Paint oldPaint = linePaint;
        linePaint = lPaint;

        if (lineColorButton != null) {
            lineColorButton.setIcon(getIconForPaint(linePaint, false));
        }
View Full Code Here

     */
    public void setSelectPaint(Paint sPaint) {
        if (sPaint == selectPaint)
            return;

        Paint oldPaint = selectPaint;
        selectPaint = sPaint;

        if (selectColorButton != null) {
            selectColorButton.setIcon(getIconForPaint(selectPaint, false));
        }
View Full Code Here

     */
    public void setFillPaint(Paint fPaint) {
        if (fPaint == fillPaint)
            return;

        Paint oldPaint = fillPaint;
        fillPaint = fPaint;

        if (fillColorButton != null) {
            fillColorButton.setIcon(getIconForPaint(fillPaint, true));
        }
View Full Code Here

     */
    public void setMattingPaint(Paint mPaint) {
        if (mPaint == mattingPaint)
            return;

        Paint oldPaint = mattingPaint;
        mattingPaint = mPaint;

        if (mattingColorButton != null) {
            mattingColorButton.setIcon(getMattingIconForPaint());
        }
View Full Code Here

     * fillPaint.
     *
     * @param fPattern the TexturePaint to set.
     */
    public void setFillPattern(TexturePaint fPattern) {
        Paint oldPattern = fPattern;
        fillPattern = fPattern;

        if (fillColorButton != null) {
            // GUI doesn't handle fill patterns yet.
        }
View Full Code Here

     */
    public void actionPerformed(ActionEvent e) {
        Object source = e.getSource();
        String command = e.getActionCommand();
        String interString;
        Paint tmpPaint;
        if (command == LineColorCommand && linePaint instanceof Color) {
            interString = i18n.get(DrawingAttributes.class,
                    "chooseLineColor",
                    "Choose Line Color");
            tmpPaint = getNewPaint((Component) source,
View Full Code Here

     * @return a matting paint choice icon for the current settings of this
     *         DrawingAttributes object, with the matting paint used.
     */
    public ImageIcon getMattingIconForPaint() {

        Paint paint = getMattingPaint();

        DrawingAttributes da = new DrawingAttributes();
        da.setLinePaint(paint);
        da.setStroke(new BasicStroke(3));

        DrawingAttributes innerda = new DrawingAttributes();
        innerda.setLinePaint(Color.white);
        innerda.setStroke(new BasicStroke(1));

        OpenMapAppPartCollection collection = OpenMapAppPartCollection.getInstance();
        IconPartList parts = new IconPartList();

        if (paint instanceof Color) {
            Color color = (Color) paint;
            Paint opaqueColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), 255);
            DrawingAttributes opaqueDA = new DrawingAttributes();
            opaqueDA.setLinePaint(opaqueColor);
            opaqueDA.setStroke(new BasicStroke(3));

            parts.add(collection.get("LR_TRI", opaqueDA));
View Full Code Here

     */
    public void setBckgrnd(Paint paint) {
        setBufferDirty(true);

        // Instead, do this.
        Paint oldBackground = background;
        background = paint;
        firePropertyChange(BackgroundProperty, oldBackground, background);

        repaint();
    }
View Full Code Here

     * null.
     *
     * @return color java.awt.Color.
     */
    public Color getBackground() {
        Paint ret = getBckgrnd();
        if (ret instanceof Color) {
            return (Color) ret;
        }

        return super.getBackground();
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.