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

org.meteoinfo.chart.plot.GridLine Maven / Gradle / Ivy

There is a newer version: 3.8
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.meteoinfo.chart.plot;

import org.meteoinfo.geometry.legend.LineStyles;

import java.awt.*;

/**
 *
 * @author yaqiang
 */
public class GridLine {
    // 
    private Color color;
    private float size;
    private LineStyles style;
    private boolean drawXLine;
    private boolean drawYLine;
    private boolean drawZLine;
    private boolean top;
    //     
    // 
    /**
     * Constructor
     */
    public GridLine(){
        this.color = Color.LIGHT_GRAY;
        this.size = 1.0f;
        this.style = LineStyles.DASH;
        this.drawXLine = false;
        this.drawYLine = false;
        this.drawZLine = false;
        this.top = false;
    }

    /**
     * Constructor
     * @param visible
     */
    public GridLine(boolean visible) {
        this();
        this.drawXLine = visible;
        this.drawYLine = visible;
        this.drawZLine = visible;
    }
    // 
    // 
    /**
     * Get color
     * @return Color
     */
    public Color getColor(){
        return this.color;
    }
    
    /**
     * Set color
     * @param value Color
     */
    public void setColor(Color value){
        this.color = value;
    }
    
    /**
     * Get size
     * @return Size
     */
    public float getSize(){
        return this.size;        
    }
    
    /**
     * Set size
     * @param value Size
     */
    public void setSize(float value) {
        this.size = value;
    }
    
    /**
     * Get style
     * @return Style
     */
    public LineStyles getStyle(){
        return this.style;
    }
    
    /**
     * Set style
     * @param value Style
     */
    public void setStyle(LineStyles value){
        this.style = value;
    }
    
    /**
     * Get if draw x grid lines
     * @return Boolean
     */
    public boolean isDrawXLine(){
        return this.drawXLine;
    }
    
    /**
     * Set if draw x grid lines
     * @param value Boolean
     */
    public void setDrawXLine(boolean value){
        this.drawXLine = value;
    }
    
    /**
     * Get if draw y grid lines
     * @return Boolean
     */
    public boolean isDrawYLine(){
        return this.drawYLine;
    }
    
    /**
     * Set if draw y grid lines
     * @param value Boolean
     */
    public void setDrawYLine(boolean value){
        this.drawYLine = value;
    }

    /**
     * Get if draw z grid lines
     * @return Boolean
     */
    public boolean isDrawZLine(){
        return this.drawZLine;
    }

    /**
     * Set if draw z grid lines
     * @param value Boolean
     */
    public void setDrawZLine(boolean value){
        this.drawZLine = value;
    }
    
    /**
     * Return if the grid draw on the top of the graph
     * @return Boolean
     */
    public boolean isTop(){
        return this.top;
    }
    
    /**
     * Set if the grid draw on the top of the graph
     * @param value Boolean
     */
    public void setTop(boolean value){
        this.top = value;
    }
    // 
    // 
    // 
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy