001/* 002 * This file is part of McIDAS-V 003 * 004 * Copyright 2007-2016 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 029package edu.wisc.ssec.mcidasv.control; 030 031 032/** 033 * Class FrameComponentInfo Holds the state of 034 * the frame components from McIDAS-X 035 */ 036public 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 public FrameComponentInfo() { 057 } 058 059 /** 060 * Copy constructor 061 * 062 * @param that The FrameComponentInfo to copy 063 * 064 */ 065 public FrameComponentInfo(FrameComponentInfo that) { 066 this.isImage = that.isImage; 067 this.isGraphics = that.isGraphics; 068 this.isColorTable = that.isColorTable; 069 this.isAnnotation = that.isAnnotation; 070 this.resetProjection = that.resetProjection; 071 this.fakeDateTime = that.fakeDateTime; 072 } 073 074 /** 075 * Constructor 076 * 077 * @param isImage The isImage parameter 078 * @param isGraphics The isGraphics parameter 079 * @param isColorTable The isColorTable parameter 080 * @param isAnnotation 081 * @param resetProjection 082 * @param fakeDateTime 083 */ 084 public FrameComponentInfo(boolean isImage, 085 boolean isGraphics, 086 boolean isColorTable, 087 boolean isAnnotation, 088 boolean resetProjection, 089 boolean fakeDateTime) { 090 this.isImage = isImage; 091 this.isGraphics = isGraphics; 092 this.isColorTable = isColorTable; 093 this.isAnnotation = isAnnotation; 094 this.resetProjection = resetProjection; 095 this.fakeDateTime = fakeDateTime; 096 } 097 098 /** 099 * Get the isImage property. 100 * 101 * @return The isImage property. 102 */ 103 public boolean getIsImage() { 104 return this.isImage; 105 } 106 107 /** 108 * Get the isGraphics property. 109 * 110 * @return The isGraphics property. 111 */ 112 public boolean getIsGraphics() { 113 return this.isGraphics; 114 } 115 116 /** 117 * Get the isColorTable property. 118 * 119 * @return The isColorTable property. 120 */ 121 public boolean getIsColorTable() { 122 return this.isColorTable; 123 } 124 125 /** 126 * Get the isAnnotation property. 127 * 128 * @return The isAnnotation property. 129 */ 130 public boolean getIsAnnotation() { 131 return this.isAnnotation; 132 } 133 134 /** 135 * Get the resetProjection property. 136 * 137 * @return The resetProjection property. 138 */ 139 public boolean getResetProjection() { 140 return this.resetProjection; 141 } 142 143 /** 144 * Get the fakeDateTime property. 145 * 146 * @return The fakeDateTime property. 147 */ 148 public boolean getFakeDateTime() { 149 return this.fakeDateTime; 150 } 151 152 /** 153 * Set the isImage property. 154 * 155 * @param newValue The new vaue for the isImage property. 156 */ 157 public void setIsImage(boolean newValue) { 158 this.isImage = newValue; 159 } 160 161 /** 162 * Set the isGraphics property. 163 * 164 * @param newValue The new vaue for the isGraphics property. 165 */ 166 public void setIsGraphics(boolean newValue) { 167 this.isGraphics = newValue; 168 } 169 170 /** 171 * Set the isColorTable property. 172 * 173 * @param newValue The new vaue for the isColorTable property. 174 */ 175 public void setIsColorTable(boolean newValue) { 176 this.isColorTable = newValue; 177 } 178 179 /** 180 * Set the isAnnotation property. 181 * 182 * @param newValue The new vaue for the isAnnotation property. 183 */ 184 public void setIsAnnotation(boolean newValue) { 185 this.isAnnotation = newValue; 186 } 187 188 /** 189 * Set the resetProjection property. 190 * 191 * @param newValue The new vaue for the resetProjection property. 192 */ 193 public void setResetProjection(boolean newValue) { 194 this.resetProjection = newValue; 195 } 196 197 /** 198 * Set the fakeDateTime property. 199 * 200 * @param newValue The new vaue for the fakeDateTime property. 201 */ 202 public void setFakeDateTime(boolean newValue) { 203 this.fakeDateTime = newValue; 204 } 205 206 /** 207 * Get a String representation of this object 208 * @return a string representation 209 */ 210 public String toString() { 211 // max possible length should be 120 212 return new StringBuilder(128) 213 .append("isImage: ") 214 .append(this.isImage) 215 .append(", isGraphics: ") 216 .append(this.isGraphics) 217 .append(", isColorTable: ") 218 .append(this.isColorTable) 219 .append(", isAnnotation: ") 220 .append(this.isAnnotation) 221 .append(", resetProjection: ") 222 .append(this.resetProjection) 223 .append(", fakeDateTime: ") 224 .append(this.fakeDateTime) 225 .toString(); 226 } 227 228}