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