001/*
002 * $Id: FrameComponentInfo.java,v 1.7 2011/03/24 16:06:32 davep Exp $
003 *
004 * This file is part of McIDAS-V
005 *
006 * Copyright 2007-2011
007 * Space Science and Engineering Center (SSEC)
008 * University of Wisconsin - Madison
009 * 1225 W. Dayton Street, Madison, WI 53706, USA
010 * https://www.ssec.wisc.edu/mcidas
011 * 
012 * All Rights Reserved
013 * 
014 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and
015 * some McIDAS-V source code is based on IDV and VisAD source code.  
016 * 
017 * McIDAS-V is free software; you can redistribute it and/or modify
018 * it under the terms of the GNU Lesser Public License as published by
019 * the Free Software Foundation; either version 3 of the License, or
020 * (at your option) any later version.
021 * 
022 * McIDAS-V is distributed in the hope that it will be useful,
023 * but WITHOUT ANY WARRANTY; without even the implied warranty of
024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
025 * GNU Lesser Public License for more details.
026 * 
027 * You should have received a copy of the GNU Lesser Public License
028 * along with this program.  If not, see http://www.gnu.org/licenses.
029 */
030
031package edu.wisc.ssec.mcidasv.control;
032
033
034/**
035 * Class FrameComponentInfo Holds the state of
036 * the frame components from McIDAS-X
037 */
038public class FrameComponentInfo {
039
040    /** Should we include image data */
041    private boolean isImage = true;
042
043    /** Should we include graphics data */
044    private boolean isGraphics = true;
045
046    /** Should we include color tables data */
047    private boolean isColorTable = true;
048    
049    /** Should we include the annotation line */
050    private boolean isAnnotation = true;
051    
052    /** Should we reset the projection when the data is refreshed */
053    private boolean resetProjection = true;
054    
055    /** Should we fake the date to preserve frame order */
056    private boolean fakeDateTime = false;
057
058    /**
059     * Constructor
060     *
061     *
062     */
063    public FrameComponentInfo() {}
064
065    /**
066     * Copy constructor
067     *
068     * @param that The FrameComponentInfo to copy
069     *
070     */
071    public FrameComponentInfo(FrameComponentInfo that) {
072        this.isImage         = that.isImage;
073        this.isGraphics      = that.isGraphics;
074        this.isColorTable    = that.isColorTable;
075        this.isAnnotation    = that.isAnnotation;
076        this.resetProjection = that.resetProjection;
077        this.fakeDateTime    = that.fakeDateTime;
078    }
079
080    /**
081     * Constructor
082     *
083     * @param isImage The isImage parameter
084     * @param isGraphics The isGraphics parameter
085     * @param isColorTable The isColorTable parameter
086     *
087     */
088    public FrameComponentInfo(boolean isImage,
089                                                  boolean isGraphics,
090                                                  boolean isColorTable,
091                                                  boolean isAnnotation,
092                                                  boolean resetProjection,
093                                                  boolean fakeDateTime) {
094        this.isImage = isImage;
095        this.isGraphics = isGraphics;
096        this.isColorTable = isColorTable;
097        this.isAnnotation = isAnnotation;
098        this.resetProjection = resetProjection;
099        this.fakeDateTime = fakeDateTime;
100    }
101
102    /**
103     * Get the isImage property.
104     *
105     * @return The isImage property.
106     */
107    public boolean getIsImage() {
108        return this.isImage;
109    }
110
111    /**
112     * Get the isGraphics property.
113     *
114     * @return The isGraphics property.
115     */
116    public boolean getIsGraphics() {
117        return this.isGraphics;
118    }
119
120    /**
121     * Get the isColorTable property.
122     *
123     * @return The isColorTable property.
124     */
125    public boolean getIsColorTable() {
126        return this.isColorTable;
127    }
128    
129    /**
130     * Get the isAnnotation property.
131     *
132     * @return The isAnnotation property.
133     */
134    public boolean getIsAnnotation() {
135        return this.isAnnotation;
136    }
137    
138    /**
139     * Get the resetProjection property.
140     *
141     * @return The resetProjection property.
142     */
143    public boolean getResetProjection() {
144        return this.resetProjection;
145    }
146
147    /**
148     * Get the fakeDateTime property.
149     *
150     * @return The fakeDateTime property.
151     */
152    public boolean getFakeDateTime() {
153        return this.fakeDateTime;
154    }
155
156    /**
157     * Set the isImage property.
158     *
159     * @param newValue The new vaue for the isImage property.
160     */
161    public void setIsImage(boolean newValue) {
162        this.isImage = newValue;
163    }
164
165    /**
166     * Set the isGraphics property.
167     *
168     * @param newValue The new vaue for the isGraphics property.
169     */
170    public void setIsGraphics(boolean newValue) {
171        this.isGraphics = newValue;
172    }
173
174    /**
175     * Set the isColorTable property.
176     *
177     * @param newValue The new vaue for the isColorTable property.
178     */
179    public void setIsColorTable(boolean newValue) {
180        this.isColorTable = newValue;
181    }
182
183    /**
184     * Set the isAnnotation property.
185     *
186     * @param newValue The new vaue for the isAnnotation property.
187     */
188    public void setIsAnnotation(boolean newValue) {
189        this.isAnnotation = newValue;
190    }
191    
192    /**
193     * Set the resetProjection property.
194     *
195     * @param newValue The new vaue for the resetProjection property.
196     */
197    public void setResetProjection(boolean newValue) {
198        this.resetProjection = newValue;
199    }
200    
201    /**
202     * Set the fakeDateTime property.
203     *
204     * @param newValue The new vaue for the fakeDateTime property.
205     */
206    public void setFakeDateTime(boolean newValue) {
207        this.fakeDateTime = newValue;
208    }
209    
210    /**
211     * Get a String representation of this object
212     * @return a string representation
213     */
214    public String toString() {
215        StringBuffer buf = new StringBuffer();
216        buf.append("isImage: ");
217        buf.append(this.isImage);
218        buf.append(", isGraphics: ");
219        buf.append(this.isGraphics);
220        buf.append(", isColorTable: ");
221        buf.append(this.isColorTable);
222        buf.append(", isAnnotation: ");
223        buf.append(this.isAnnotation);
224        buf.append(", resetProjection: ");
225        buf.append(this.resetProjection);
226        buf.append(", fakeDateTime: ");
227        buf.append(this.fakeDateTime);
228        return buf.toString();
229    }
230
231}