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

com.day.cq.dam.commons.watermark.Font Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
package com.day.cq.dam.commons.watermark;

import java.awt.*;

/**
 *
 */
public class Font {
    public static final int DEFAULT_SIZE = 48; //px
    public static final Color DEFAULT_COLOR = new Color(0,0,0); //black
    public static final String DEFAULT_FAMILY = java.awt.Font.SERIF;

    private int size = DEFAULT_SIZE;

    private Color color = DEFAULT_COLOR;

    private String family = DEFAULT_FAMILY;

    public Font() {}

    public Font(int size) {
        this.size = size;
    }

    public Font(int size, Color color) {
        this.size = size;
        this.color = color;
    }

    public Font(int size, Color color, String family) {
        this.size = size;
        this.color = color;
        this.family = family;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public String getFamily() {
        return family;
    }

    public void setFamily(String family) {
        this.family = family;
    }

    @Override
    public String toString() {
        return  "\nsize = " + size +
                "\ncolor = " + color +
                "\nfamily = " + family;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy