All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.netbeans.modeler.shape.GradientPaint Maven / Gradle / Ivy

Go to download

Jeddict is an open source Jakarta EE application development platform that accelerates developers productivity and simplifies development tasks of creating complex entity relationship models.

There is a newer version: 6.3.1
Show newest version
/**
 * Copyright 2013-2022 Gaurav Gupta
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.netbeans.modeler.shape;

import java.awt.Color;
import jakarta.json.bind.annotation.JsonbTypeAdapter;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.netbeans.modeler.shape.adapter.ColorAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
public class GradientPaint {

    @XmlAttribute(name = "start-color")
    @XmlJavaTypeAdapter(ColorAdapter.class)
    @JsonbTypeAdapter(ColorAdapter.class)
    private Color startColor;
    @XmlAttribute(name = "start-offset")
    private Float startOffset;
    @XmlAttribute(name = "end-color")
    @XmlJavaTypeAdapter(ColorAdapter.class)
    @JsonbTypeAdapter(ColorAdapter.class)
    private Color endColor;
    @XmlAttribute(name = "end-offset")
    private Float endOffset;

    public GradientPaint(Color startColor, Float startOffset, Color endColor, Float endOffset) {
        this.startColor = startColor;
        this.startOffset = startOffset;
        this.endColor = endColor;
        this.endOffset = endOffset;
    }

    public GradientPaint() {
    }

    /**
     * @return the startColor
     */
    public Color getStartColor() {
        return startColor;
    }

    /**
     * @param startColor the startColor to set
     */
    public void setStartColor(Color startColor) {
        this.startColor = startColor;
    }

    /**
     * @return the startOffset
     */
    public Float getStartOffset() {
        return startOffset;
    }

    /**
     * @param startOffset the startOffset to set
     */
    public void setStartOffset(Float startOffset) {
        this.startOffset = startOffset;
    }

    /**
     * @return the endColor
     */
    public Color getEndColor() {
        return endColor;
    }

    /**
     * @param endColor the endColor to set
     */
    public void setEndColor(Color endColor) {
        this.endColor = endColor;
    }

    /**
     * @return the endOffset
     */
    public Float getEndOffset() {
        return endOffset;
    }

    /**
     * @param endOffset the endOffset to set
     */
    public void setEndOffset(Float endOffset) {
        this.endOffset = endOffset;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy