2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.binding;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Viewport implements java.io.Serializable {
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
41 * Field _conservationSelected.
43 private boolean _conservationSelected;
46 * keeps track of state for field: _conservationSelected
48 private boolean _has_conservationSelected;
53 private boolean _pidSelected;
56 * keeps track of state for field: _pidSelected
58 private boolean _has_pidSelected;
63 private java.lang.String _bgColour;
66 * Field _consThreshold.
68 private int _consThreshold;
71 * keeps track of state for field: _consThreshold
73 private boolean _has_consThreshold;
76 * Field _pidThreshold.
78 private int _pidThreshold;
81 * keeps track of state for field: _pidThreshold
83 private boolean _has_pidThreshold;
88 private java.lang.String _title;
93 private boolean _showFullId;
96 * keeps track of state for field: _showFullId
98 private boolean _has_showFullId;
103 private boolean _showText;
106 * keeps track of state for field: _showText
108 private boolean _has_showText;
111 * Field _showColourText.
113 private boolean _showColourText;
116 * keeps track of state for field: _showColourText
118 private boolean _has_showColourText;
123 private boolean _showBoxes;
126 * keeps track of state for field: _showBoxes
128 private boolean _has_showBoxes;
131 * Field _wrapAlignment.
133 private boolean _wrapAlignment;
136 * keeps track of state for field: _wrapAlignment
138 private boolean _has_wrapAlignment;
143 private boolean _renderGaps;
146 * keeps track of state for field: _renderGaps
148 private boolean _has_renderGaps;
151 * Field _showSequenceFeatures.
153 private boolean _showSequenceFeatures;
156 * keeps track of state for field: _showSequenceFeatures
158 private boolean _has_showSequenceFeatures;
161 * Field _showAnnotation.
163 private boolean _showAnnotation;
166 * keeps track of state for field: _showAnnotation
168 private boolean _has_showAnnotation;
171 * Field _showConservation.
173 private boolean _showConservation;
176 * keeps track of state for field: _showConservation
178 private boolean _has_showConservation;
181 * Field _showQuality.
183 private boolean _showQuality;
186 * keeps track of state for field: _showQuality
188 private boolean _has_showQuality;
191 * Field _showIdentity.
193 private boolean _showIdentity;
196 * keeps track of state for field: _showIdentity
198 private boolean _has_showIdentity;
206 * keeps track of state for field: _xpos
208 private boolean _has_xpos;
216 * keeps track of state for field: _ypos
218 private boolean _has_ypos;
226 * keeps track of state for field: _width
228 private boolean _has_width;
236 * keeps track of state for field: _height
238 private boolean _has_height;
243 private int _startRes;
246 * keeps track of state for field: _startRes
248 private boolean _has_startRes;
253 private int _startSeq;
256 * keeps track of state for field: _startSeq
258 private boolean _has_startSeq;
263 private java.lang.String _fontName;
268 private int _fontSize;
271 * keeps track of state for field: _fontSize
273 private boolean _has_fontSize;
278 private int _fontStyle;
281 * keeps track of state for field: _fontStyle
283 private boolean _has_fontStyle;
301 public void deleteConsThreshold(
303 this._has_consThreshold= false;
308 public void deleteConservationSelected(
310 this._has_conservationSelected= false;
315 public void deleteFontSize(
317 this._has_fontSize= false;
322 public void deleteFontStyle(
324 this._has_fontStyle= false;
329 public void deleteHeight(
331 this._has_height= false;
336 public void deletePidSelected(
338 this._has_pidSelected= false;
343 public void deletePidThreshold(
345 this._has_pidThreshold= false;
350 public void deleteRenderGaps(
352 this._has_renderGaps= false;
357 public void deleteShowAnnotation(
359 this._has_showAnnotation= false;
364 public void deleteShowBoxes(
366 this._has_showBoxes= false;
371 public void deleteShowColourText(
373 this._has_showColourText= false;
378 public void deleteShowConservation(
380 this._has_showConservation= false;
385 public void deleteShowFullId(
387 this._has_showFullId= false;
392 public void deleteShowIdentity(
394 this._has_showIdentity= false;
399 public void deleteShowQuality(
401 this._has_showQuality= false;
406 public void deleteShowSequenceFeatures(
408 this._has_showSequenceFeatures= false;
413 public void deleteShowText(
415 this._has_showText= false;
420 public void deleteStartRes(
422 this._has_startRes= false;
427 public void deleteStartSeq(
429 this._has_startSeq= false;
434 public void deleteWidth(
436 this._has_width= false;
441 public void deleteWrapAlignment(
443 this._has_wrapAlignment= false;
448 public void deleteXpos(
450 this._has_xpos= false;
455 public void deleteYpos(
457 this._has_ypos= false;
461 * Returns the value of field 'bgColour'.
463 * @return the value of field 'BgColour'.
465 public java.lang.String getBgColour(
467 return this._bgColour;
471 * Returns the value of field 'consThreshold'.
473 * @return the value of field 'ConsThreshold'.
475 public int getConsThreshold(
477 return this._consThreshold;
481 * Returns the value of field 'conservationSelected'.
483 * @return the value of field 'ConservationSelected'.
485 public boolean getConservationSelected(
487 return this._conservationSelected;
491 * Returns the value of field 'fontName'.
493 * @return the value of field 'FontName'.
495 public java.lang.String getFontName(
497 return this._fontName;
501 * Returns the value of field 'fontSize'.
503 * @return the value of field 'FontSize'.
505 public int getFontSize(
507 return this._fontSize;
511 * Returns the value of field 'fontStyle'.
513 * @return the value of field 'FontStyle'.
515 public int getFontStyle(
517 return this._fontStyle;
521 * Returns the value of field 'height'.
523 * @return the value of field 'Height'.
525 public int getHeight(
531 * Returns the value of field 'pidSelected'.
533 * @return the value of field 'PidSelected'.
535 public boolean getPidSelected(
537 return this._pidSelected;
541 * Returns the value of field 'pidThreshold'.
543 * @return the value of field 'PidThreshold'.
545 public int getPidThreshold(
547 return this._pidThreshold;
551 * Returns the value of field 'renderGaps'.
553 * @return the value of field 'RenderGaps'.
555 public boolean getRenderGaps(
557 return this._renderGaps;
561 * Returns the value of field 'showAnnotation'.
563 * @return the value of field 'ShowAnnotation'.
565 public boolean getShowAnnotation(
567 return this._showAnnotation;
571 * Returns the value of field 'showBoxes'.
573 * @return the value of field 'ShowBoxes'.
575 public boolean getShowBoxes(
577 return this._showBoxes;
581 * Returns the value of field 'showColourText'.
583 * @return the value of field 'ShowColourText'.
585 public boolean getShowColourText(
587 return this._showColourText;
591 * Returns the value of field 'showConservation'.
593 * @return the value of field 'ShowConservation'.
595 public boolean getShowConservation(
597 return this._showConservation;
601 * Returns the value of field 'showFullId'.
603 * @return the value of field 'ShowFullId'.
605 public boolean getShowFullId(
607 return this._showFullId;
611 * Returns the value of field 'showIdentity'.
613 * @return the value of field 'ShowIdentity'.
615 public boolean getShowIdentity(
617 return this._showIdentity;
621 * Returns the value of field 'showQuality'.
623 * @return the value of field 'ShowQuality'.
625 public boolean getShowQuality(
627 return this._showQuality;
631 * Returns the value of field 'showSequenceFeatures'.
633 * @return the value of field 'ShowSequenceFeatures'.
635 public boolean getShowSequenceFeatures(
637 return this._showSequenceFeatures;
641 * Returns the value of field 'showText'.
643 * @return the value of field 'ShowText'.
645 public boolean getShowText(
647 return this._showText;
651 * Returns the value of field 'startRes'.
653 * @return the value of field 'StartRes'.
655 public int getStartRes(
657 return this._startRes;
661 * Returns the value of field 'startSeq'.
663 * @return the value of field 'StartSeq'.
665 public int getStartSeq(
667 return this._startSeq;
671 * Returns the value of field 'title'.
673 * @return the value of field 'Title'.
675 public java.lang.String getTitle(
681 * Returns the value of field 'width'.
683 * @return the value of field 'Width'.
691 * Returns the value of field 'wrapAlignment'.
693 * @return the value of field 'WrapAlignment'.
695 public boolean getWrapAlignment(
697 return this._wrapAlignment;
701 * Returns the value of field 'xpos'.
703 * @return the value of field 'Xpos'.
711 * Returns the value of field 'ypos'.
713 * @return the value of field 'Ypos'.
721 * Method hasConsThreshold.
723 * @return true if at least one ConsThreshold has been added
725 public boolean hasConsThreshold(
727 return this._has_consThreshold;
731 * Method hasConservationSelected.
733 * @return true if at least one ConservationSelected has been
736 public boolean hasConservationSelected(
738 return this._has_conservationSelected;
742 * Method hasFontSize.
744 * @return true if at least one FontSize has been added
746 public boolean hasFontSize(
748 return this._has_fontSize;
752 * Method hasFontStyle.
754 * @return true if at least one FontStyle has been added
756 public boolean hasFontStyle(
758 return this._has_fontStyle;
764 * @return true if at least one Height has been added
766 public boolean hasHeight(
768 return this._has_height;
772 * Method hasPidSelected.
774 * @return true if at least one PidSelected has been added
776 public boolean hasPidSelected(
778 return this._has_pidSelected;
782 * Method hasPidThreshold.
784 * @return true if at least one PidThreshold has been added
786 public boolean hasPidThreshold(
788 return this._has_pidThreshold;
792 * Method hasRenderGaps.
794 * @return true if at least one RenderGaps has been added
796 public boolean hasRenderGaps(
798 return this._has_renderGaps;
802 * Method hasShowAnnotation.
804 * @return true if at least one ShowAnnotation has been added
806 public boolean hasShowAnnotation(
808 return this._has_showAnnotation;
812 * Method hasShowBoxes.
814 * @return true if at least one ShowBoxes has been added
816 public boolean hasShowBoxes(
818 return this._has_showBoxes;
822 * Method hasShowColourText.
824 * @return true if at least one ShowColourText has been added
826 public boolean hasShowColourText(
828 return this._has_showColourText;
832 * Method hasShowConservation.
834 * @return true if at least one ShowConservation has been added
836 public boolean hasShowConservation(
838 return this._has_showConservation;
842 * Method hasShowFullId.
844 * @return true if at least one ShowFullId has been added
846 public boolean hasShowFullId(
848 return this._has_showFullId;
852 * Method hasShowIdentity.
854 * @return true if at least one ShowIdentity has been added
856 public boolean hasShowIdentity(
858 return this._has_showIdentity;
862 * Method hasShowQuality.
864 * @return true if at least one ShowQuality has been added
866 public boolean hasShowQuality(
868 return this._has_showQuality;
872 * Method hasShowSequenceFeatures.
874 * @return true if at least one ShowSequenceFeatures has been
877 public boolean hasShowSequenceFeatures(
879 return this._has_showSequenceFeatures;
883 * Method hasShowText.
885 * @return true if at least one ShowText has been added
887 public boolean hasShowText(
889 return this._has_showText;
893 * Method hasStartRes.
895 * @return true if at least one StartRes has been added
897 public boolean hasStartRes(
899 return this._has_startRes;
903 * Method hasStartSeq.
905 * @return true if at least one StartSeq has been added
907 public boolean hasStartSeq(
909 return this._has_startSeq;
915 * @return true if at least one Width has been added
917 public boolean hasWidth(
919 return this._has_width;
923 * Method hasWrapAlignment.
925 * @return true if at least one WrapAlignment has been added
927 public boolean hasWrapAlignment(
929 return this._has_wrapAlignment;
935 * @return true if at least one Xpos has been added
937 public boolean hasXpos(
939 return this._has_xpos;
945 * @return true if at least one Ypos has been added
947 public boolean hasYpos(
949 return this._has_ypos;
953 * Returns the value of field 'conservationSelected'.
955 * @return the value of field 'ConservationSelected'.
957 public boolean isConservationSelected(
959 return this._conservationSelected;
963 * Returns the value of field 'pidSelected'.
965 * @return the value of field 'PidSelected'.
967 public boolean isPidSelected(
969 return this._pidSelected;
973 * Returns the value of field 'renderGaps'.
975 * @return the value of field 'RenderGaps'.
977 public boolean isRenderGaps(
979 return this._renderGaps;
983 * Returns the value of field 'showAnnotation'.
985 * @return the value of field 'ShowAnnotation'.
987 public boolean isShowAnnotation(
989 return this._showAnnotation;
993 * Returns the value of field 'showBoxes'.
995 * @return the value of field 'ShowBoxes'.
997 public boolean isShowBoxes(
999 return this._showBoxes;
1003 * Returns the value of field 'showColourText'.
1005 * @return the value of field 'ShowColourText'.
1007 public boolean isShowColourText(
1009 return this._showColourText;
1013 * Returns the value of field 'showConservation'.
1015 * @return the value of field 'ShowConservation'.
1017 public boolean isShowConservation(
1019 return this._showConservation;
1023 * Returns the value of field 'showFullId'.
1025 * @return the value of field 'ShowFullId'.
1027 public boolean isShowFullId(
1029 return this._showFullId;
1033 * Returns the value of field 'showIdentity'.
1035 * @return the value of field 'ShowIdentity'.
1037 public boolean isShowIdentity(
1039 return this._showIdentity;
1043 * Returns the value of field 'showQuality'.
1045 * @return the value of field 'ShowQuality'.
1047 public boolean isShowQuality(
1049 return this._showQuality;
1053 * Returns the value of field 'showSequenceFeatures'.
1055 * @return the value of field 'ShowSequenceFeatures'.
1057 public boolean isShowSequenceFeatures(
1059 return this._showSequenceFeatures;
1063 * Returns the value of field 'showText'.
1065 * @return the value of field 'ShowText'.
1067 public boolean isShowText(
1069 return this._showText;
1075 * @return true if this object is valid according to the schema
1077 public boolean isValid(
1081 } catch (org.exolab.castor.xml.ValidationException vex) {
1088 * Returns the value of field 'wrapAlignment'.
1090 * @return the value of field 'WrapAlignment'.
1092 public boolean isWrapAlignment(
1094 return this._wrapAlignment;
1101 * @throws org.exolab.castor.xml.MarshalException if object is
1102 * null or if any SAXException is thrown during marshaling
1103 * @throws org.exolab.castor.xml.ValidationException if this
1104 * object is an invalid instance according to the schema
1106 public void marshal(
1107 final java.io.Writer out)
1108 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1109 Marshaller.marshal(this, out);
1116 * @throws java.io.IOException if an IOException occurs during
1118 * @throws org.exolab.castor.xml.ValidationException if this
1119 * object is an invalid instance according to the schema
1120 * @throws org.exolab.castor.xml.MarshalException if object is
1121 * null or if any SAXException is thrown during marshaling
1123 public void marshal(
1124 final org.xml.sax.ContentHandler handler)
1125 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1126 Marshaller.marshal(this, handler);
1130 * Sets the value of field 'bgColour'.
1132 * @param bgColour the value of field 'bgColour'.
1134 public void setBgColour(
1135 final java.lang.String bgColour) {
1136 this._bgColour = bgColour;
1140 * Sets the value of field 'consThreshold'.
1142 * @param consThreshold the value of field 'consThreshold'.
1144 public void setConsThreshold(
1145 final int consThreshold) {
1146 this._consThreshold = consThreshold;
1147 this._has_consThreshold = true;
1151 * Sets the value of field 'conservationSelected'.
1153 * @param conservationSelected the value of field
1154 * 'conservationSelected'.
1156 public void setConservationSelected(
1157 final boolean conservationSelected) {
1158 this._conservationSelected = conservationSelected;
1159 this._has_conservationSelected = true;
1163 * Sets the value of field 'fontName'.
1165 * @param fontName the value of field 'fontName'.
1167 public void setFontName(
1168 final java.lang.String fontName) {
1169 this._fontName = fontName;
1173 * Sets the value of field 'fontSize'.
1175 * @param fontSize the value of field 'fontSize'.
1177 public void setFontSize(
1178 final int fontSize) {
1179 this._fontSize = fontSize;
1180 this._has_fontSize = true;
1184 * Sets the value of field 'fontStyle'.
1186 * @param fontStyle the value of field 'fontStyle'.
1188 public void setFontStyle(
1189 final int fontStyle) {
1190 this._fontStyle = fontStyle;
1191 this._has_fontStyle = true;
1195 * Sets the value of field 'height'.
1197 * @param height the value of field 'height'.
1199 public void setHeight(
1201 this._height = height;
1202 this._has_height = true;
1206 * Sets the value of field 'pidSelected'.
1208 * @param pidSelected the value of field 'pidSelected'.
1210 public void setPidSelected(
1211 final boolean pidSelected) {
1212 this._pidSelected = pidSelected;
1213 this._has_pidSelected = true;
1217 * Sets the value of field 'pidThreshold'.
1219 * @param pidThreshold the value of field 'pidThreshold'.
1221 public void setPidThreshold(
1222 final int pidThreshold) {
1223 this._pidThreshold = pidThreshold;
1224 this._has_pidThreshold = true;
1228 * Sets the value of field 'renderGaps'.
1230 * @param renderGaps the value of field 'renderGaps'.
1232 public void setRenderGaps(
1233 final boolean renderGaps) {
1234 this._renderGaps = renderGaps;
1235 this._has_renderGaps = true;
1239 * Sets the value of field 'showAnnotation'.
1241 * @param showAnnotation the value of field 'showAnnotation'.
1243 public void setShowAnnotation(
1244 final boolean showAnnotation) {
1245 this._showAnnotation = showAnnotation;
1246 this._has_showAnnotation = true;
1250 * Sets the value of field 'showBoxes'.
1252 * @param showBoxes the value of field 'showBoxes'.
1254 public void setShowBoxes(
1255 final boolean showBoxes) {
1256 this._showBoxes = showBoxes;
1257 this._has_showBoxes = true;
1261 * Sets the value of field 'showColourText'.
1263 * @param showColourText the value of field 'showColourText'.
1265 public void setShowColourText(
1266 final boolean showColourText) {
1267 this._showColourText = showColourText;
1268 this._has_showColourText = true;
1272 * Sets the value of field 'showConservation'.
1274 * @param showConservation the value of field 'showConservation'
1276 public void setShowConservation(
1277 final boolean showConservation) {
1278 this._showConservation = showConservation;
1279 this._has_showConservation = true;
1283 * Sets the value of field 'showFullId'.
1285 * @param showFullId the value of field 'showFullId'.
1287 public void setShowFullId(
1288 final boolean showFullId) {
1289 this._showFullId = showFullId;
1290 this._has_showFullId = true;
1294 * Sets the value of field 'showIdentity'.
1296 * @param showIdentity the value of field 'showIdentity'.
1298 public void setShowIdentity(
1299 final boolean showIdentity) {
1300 this._showIdentity = showIdentity;
1301 this._has_showIdentity = true;
1305 * Sets the value of field 'showQuality'.
1307 * @param showQuality the value of field 'showQuality'.
1309 public void setShowQuality(
1310 final boolean showQuality) {
1311 this._showQuality = showQuality;
1312 this._has_showQuality = true;
1316 * Sets the value of field 'showSequenceFeatures'.
1318 * @param showSequenceFeatures the value of field
1319 * 'showSequenceFeatures'.
1321 public void setShowSequenceFeatures(
1322 final boolean showSequenceFeatures) {
1323 this._showSequenceFeatures = showSequenceFeatures;
1324 this._has_showSequenceFeatures = true;
1328 * Sets the value of field 'showText'.
1330 * @param showText the value of field 'showText'.
1332 public void setShowText(
1333 final boolean showText) {
1334 this._showText = showText;
1335 this._has_showText = true;
1339 * Sets the value of field 'startRes'.
1341 * @param startRes the value of field 'startRes'.
1343 public void setStartRes(
1344 final int startRes) {
1345 this._startRes = startRes;
1346 this._has_startRes = true;
1350 * Sets the value of field 'startSeq'.
1352 * @param startSeq the value of field 'startSeq'.
1354 public void setStartSeq(
1355 final int startSeq) {
1356 this._startSeq = startSeq;
1357 this._has_startSeq = true;
1361 * Sets the value of field 'title'.
1363 * @param title the value of field 'title'.
1365 public void setTitle(
1366 final java.lang.String title) {
1367 this._title = title;
1371 * Sets the value of field 'width'.
1373 * @param width the value of field 'width'.
1375 public void setWidth(
1377 this._width = width;
1378 this._has_width = true;
1382 * Sets the value of field 'wrapAlignment'.
1384 * @param wrapAlignment the value of field 'wrapAlignment'.
1386 public void setWrapAlignment(
1387 final boolean wrapAlignment) {
1388 this._wrapAlignment = wrapAlignment;
1389 this._has_wrapAlignment = true;
1393 * Sets the value of field 'xpos'.
1395 * @param xpos the value of field 'xpos'.
1397 public void setXpos(
1400 this._has_xpos = true;
1404 * Sets the value of field 'ypos'.
1406 * @param ypos the value of field 'ypos'.
1408 public void setYpos(
1411 this._has_ypos = true;
1418 * @throws org.exolab.castor.xml.MarshalException if object is
1419 * null or if any SAXException is thrown during marshaling
1420 * @throws org.exolab.castor.xml.ValidationException if this
1421 * object is an invalid instance according to the schema
1422 * @return the unmarshaled jalview.binding.Viewport
1424 public static jalview.binding.Viewport unmarshal(
1425 final java.io.Reader reader)
1426 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1427 return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.class, reader);
1433 * @throws org.exolab.castor.xml.ValidationException if this
1434 * object is an invalid instance according to the schema
1436 public void validate(
1438 throws org.exolab.castor.xml.ValidationException {
1439 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1440 validator.validate(this);