2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
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;
300 public void deleteConsThreshold()
302 this._has_consThreshold = false;
307 public void deleteConservationSelected()
309 this._has_conservationSelected = false;
314 public void deleteFontSize()
316 this._has_fontSize = false;
321 public void deleteFontStyle()
323 this._has_fontStyle = false;
328 public void deleteHeight()
330 this._has_height = false;
335 public void deletePidSelected()
337 this._has_pidSelected = false;
342 public void deletePidThreshold()
344 this._has_pidThreshold = false;
349 public void deleteRenderGaps()
351 this._has_renderGaps = false;
356 public void deleteShowAnnotation()
358 this._has_showAnnotation = false;
363 public void deleteShowBoxes()
365 this._has_showBoxes = false;
370 public void deleteShowColourText()
372 this._has_showColourText = false;
377 public void deleteShowConservation()
379 this._has_showConservation = false;
384 public void deleteShowFullId()
386 this._has_showFullId = false;
391 public void deleteShowIdentity()
393 this._has_showIdentity = false;
398 public void deleteShowQuality()
400 this._has_showQuality = false;
405 public void deleteShowSequenceFeatures()
407 this._has_showSequenceFeatures = false;
412 public void deleteShowText()
414 this._has_showText = false;
419 public void deleteStartRes()
421 this._has_startRes = false;
426 public void deleteStartSeq()
428 this._has_startSeq = false;
433 public void deleteWidth()
435 this._has_width = false;
440 public void deleteWrapAlignment()
442 this._has_wrapAlignment = false;
447 public void deleteXpos()
449 this._has_xpos = false;
454 public void deleteYpos()
456 this._has_ypos = false;
460 * Returns the value of field 'bgColour'.
462 * @return the value of field 'BgColour'.
464 public java.lang.String getBgColour()
466 return this._bgColour;
470 * Returns the value of field 'consThreshold'.
472 * @return the value of field 'ConsThreshold'.
474 public int getConsThreshold()
476 return this._consThreshold;
480 * Returns the value of field 'conservationSelected'.
482 * @return the value of field 'ConservationSelected'.
484 public boolean getConservationSelected()
486 return this._conservationSelected;
490 * Returns the value of field 'fontName'.
492 * @return the value of field 'FontName'.
494 public java.lang.String getFontName()
496 return this._fontName;
500 * Returns the value of field 'fontSize'.
502 * @return the value of field 'FontSize'.
504 public int getFontSize()
506 return this._fontSize;
510 * Returns the value of field 'fontStyle'.
512 * @return the value of field 'FontStyle'.
514 public int getFontStyle()
516 return this._fontStyle;
520 * Returns the value of field 'height'.
522 * @return the value of field 'Height'.
524 public int getHeight()
530 * Returns the value of field 'pidSelected'.
532 * @return the value of field 'PidSelected'.
534 public boolean getPidSelected()
536 return this._pidSelected;
540 * Returns the value of field 'pidThreshold'.
542 * @return the value of field 'PidThreshold'.
544 public int getPidThreshold()
546 return this._pidThreshold;
550 * Returns the value of field 'renderGaps'.
552 * @return the value of field 'RenderGaps'.
554 public boolean getRenderGaps()
556 return this._renderGaps;
560 * Returns the value of field 'showAnnotation'.
562 * @return the value of field 'ShowAnnotation'.
564 public boolean getShowAnnotation()
566 return this._showAnnotation;
570 * Returns the value of field 'showBoxes'.
572 * @return the value of field 'ShowBoxes'.
574 public boolean getShowBoxes()
576 return this._showBoxes;
580 * Returns the value of field 'showColourText'.
582 * @return the value of field 'ShowColourText'.
584 public boolean getShowColourText()
586 return this._showColourText;
590 * Returns the value of field 'showConservation'.
592 * @return the value of field 'ShowConservation'.
594 public boolean getShowConservation()
596 return this._showConservation;
600 * Returns the value of field 'showFullId'.
602 * @return the value of field 'ShowFullId'.
604 public boolean getShowFullId()
606 return this._showFullId;
610 * Returns the value of field 'showIdentity'.
612 * @return the value of field 'ShowIdentity'.
614 public boolean getShowIdentity()
616 return this._showIdentity;
620 * Returns the value of field 'showQuality'.
622 * @return the value of field 'ShowQuality'.
624 public boolean getShowQuality()
626 return this._showQuality;
630 * Returns the value of field 'showSequenceFeatures'.
632 * @return the value of field 'ShowSequenceFeatures'.
634 public boolean getShowSequenceFeatures()
636 return this._showSequenceFeatures;
640 * Returns the value of field 'showText'.
642 * @return the value of field 'ShowText'.
644 public boolean getShowText()
646 return this._showText;
650 * Returns the value of field 'startRes'.
652 * @return the value of field 'StartRes'.
654 public int getStartRes()
656 return this._startRes;
660 * Returns the value of field 'startSeq'.
662 * @return the value of field 'StartSeq'.
664 public int getStartSeq()
666 return this._startSeq;
670 * Returns the value of field 'title'.
672 * @return the value of field 'Title'.
674 public java.lang.String getTitle()
680 * Returns the value of field 'width'.
682 * @return the value of field 'Width'.
684 public int getWidth()
690 * Returns the value of field 'wrapAlignment'.
692 * @return the value of field 'WrapAlignment'.
694 public boolean getWrapAlignment()
696 return this._wrapAlignment;
700 * Returns the value of field 'xpos'.
702 * @return the value of field 'Xpos'.
710 * Returns the value of field 'ypos'.
712 * @return the value of field 'Ypos'.
720 * Method hasConsThreshold.
722 * @return true if at least one ConsThreshold has been added
724 public boolean hasConsThreshold()
726 return this._has_consThreshold;
730 * Method hasConservationSelected.
732 * @return true if at least one ConservationSelected has been added
734 public boolean hasConservationSelected()
736 return this._has_conservationSelected;
740 * Method hasFontSize.
742 * @return true if at least one FontSize has been added
744 public boolean hasFontSize()
746 return this._has_fontSize;
750 * Method hasFontStyle.
752 * @return true if at least one FontStyle has been added
754 public boolean hasFontStyle()
756 return this._has_fontStyle;
762 * @return true if at least one Height has been added
764 public boolean hasHeight()
766 return this._has_height;
770 * Method hasPidSelected.
772 * @return true if at least one PidSelected has been added
774 public boolean hasPidSelected()
776 return this._has_pidSelected;
780 * Method hasPidThreshold.
782 * @return true if at least one PidThreshold has been added
784 public boolean hasPidThreshold()
786 return this._has_pidThreshold;
790 * Method hasRenderGaps.
792 * @return true if at least one RenderGaps has been added
794 public boolean hasRenderGaps()
796 return this._has_renderGaps;
800 * Method hasShowAnnotation.
802 * @return true if at least one ShowAnnotation has been added
804 public boolean hasShowAnnotation()
806 return this._has_showAnnotation;
810 * Method hasShowBoxes.
812 * @return true if at least one ShowBoxes has been added
814 public boolean hasShowBoxes()
816 return this._has_showBoxes;
820 * Method hasShowColourText.
822 * @return true if at least one ShowColourText has been added
824 public boolean hasShowColourText()
826 return this._has_showColourText;
830 * Method hasShowConservation.
832 * @return true if at least one ShowConservation has been added
834 public boolean hasShowConservation()
836 return this._has_showConservation;
840 * Method hasShowFullId.
842 * @return true if at least one ShowFullId has been added
844 public boolean hasShowFullId()
846 return this._has_showFullId;
850 * Method hasShowIdentity.
852 * @return true if at least one ShowIdentity has been added
854 public boolean hasShowIdentity()
856 return this._has_showIdentity;
860 * Method hasShowQuality.
862 * @return true if at least one ShowQuality has been added
864 public boolean hasShowQuality()
866 return this._has_showQuality;
870 * Method hasShowSequenceFeatures.
872 * @return true if at least one ShowSequenceFeatures has been added
874 public boolean hasShowSequenceFeatures()
876 return this._has_showSequenceFeatures;
880 * Method hasShowText.
882 * @return true if at least one ShowText has been added
884 public boolean hasShowText()
886 return this._has_showText;
890 * Method hasStartRes.
892 * @return true if at least one StartRes has been added
894 public boolean hasStartRes()
896 return this._has_startRes;
900 * Method hasStartSeq.
902 * @return true if at least one StartSeq has been added
904 public boolean hasStartSeq()
906 return this._has_startSeq;
912 * @return true if at least one Width has been added
914 public boolean hasWidth()
916 return this._has_width;
920 * Method hasWrapAlignment.
922 * @return true if at least one WrapAlignment has been added
924 public boolean hasWrapAlignment()
926 return this._has_wrapAlignment;
932 * @return true if at least one Xpos has been added
934 public boolean hasXpos()
936 return this._has_xpos;
942 * @return true if at least one Ypos has been added
944 public boolean hasYpos()
946 return this._has_ypos;
950 * Returns the value of field 'conservationSelected'.
952 * @return the value of field 'ConservationSelected'.
954 public boolean isConservationSelected()
956 return this._conservationSelected;
960 * Returns the value of field 'pidSelected'.
962 * @return the value of field 'PidSelected'.
964 public boolean isPidSelected()
966 return this._pidSelected;
970 * Returns the value of field 'renderGaps'.
972 * @return the value of field 'RenderGaps'.
974 public boolean isRenderGaps()
976 return this._renderGaps;
980 * Returns the value of field 'showAnnotation'.
982 * @return the value of field 'ShowAnnotation'.
984 public boolean isShowAnnotation()
986 return this._showAnnotation;
990 * Returns the value of field 'showBoxes'.
992 * @return the value of field 'ShowBoxes'.
994 public boolean isShowBoxes()
996 return this._showBoxes;
1000 * Returns the value of field 'showColourText'.
1002 * @return the value of field 'ShowColourText'.
1004 public boolean isShowColourText()
1006 return this._showColourText;
1010 * Returns the value of field 'showConservation'.
1012 * @return the value of field 'ShowConservation'.
1014 public boolean isShowConservation()
1016 return this._showConservation;
1020 * Returns the value of field 'showFullId'.
1022 * @return the value of field 'ShowFullId'.
1024 public boolean isShowFullId()
1026 return this._showFullId;
1030 * Returns the value of field 'showIdentity'.
1032 * @return the value of field 'ShowIdentity'.
1034 public boolean isShowIdentity()
1036 return this._showIdentity;
1040 * Returns the value of field 'showQuality'.
1042 * @return the value of field 'ShowQuality'.
1044 public boolean isShowQuality()
1046 return this._showQuality;
1050 * Returns the value of field 'showSequenceFeatures'.
1052 * @return the value of field 'ShowSequenceFeatures'.
1054 public boolean isShowSequenceFeatures()
1056 return this._showSequenceFeatures;
1060 * Returns the value of field 'showText'.
1062 * @return the value of field 'ShowText'.
1064 public boolean isShowText()
1066 return this._showText;
1072 * @return true if this object is valid according to the schema
1074 public boolean isValid()
1079 } catch (org.exolab.castor.xml.ValidationException vex)
1087 * Returns the value of field 'wrapAlignment'.
1089 * @return the value of field 'WrapAlignment'.
1091 public boolean isWrapAlignment()
1093 return this._wrapAlignment;
1100 * @throws org.exolab.castor.xml.MarshalException
1101 * if object is null or if any SAXException is thrown during
1103 * @throws org.exolab.castor.xml.ValidationException
1104 * if this object is an invalid instance according to the schema
1106 public void marshal(final java.io.Writer out)
1107 throws org.exolab.castor.xml.MarshalException,
1108 org.exolab.castor.xml.ValidationException
1110 Marshaller.marshal(this, out);
1117 * @throws java.io.IOException
1118 * if an IOException occurs during marshaling
1119 * @throws org.exolab.castor.xml.ValidationException
1120 * if this object is an invalid instance according to the schema
1121 * @throws org.exolab.castor.xml.MarshalException
1122 * if object is null or if any SAXException is thrown during
1125 public void marshal(final org.xml.sax.ContentHandler handler)
1126 throws java.io.IOException,
1127 org.exolab.castor.xml.MarshalException,
1128 org.exolab.castor.xml.ValidationException
1130 Marshaller.marshal(this, handler);
1134 * Sets the value of field 'bgColour'.
1137 * the value of field 'bgColour'.
1139 public void setBgColour(final java.lang.String bgColour)
1141 this._bgColour = bgColour;
1145 * Sets the value of field 'consThreshold'.
1147 * @param consThreshold
1148 * the value of field 'consThreshold'.
1150 public void setConsThreshold(final int consThreshold)
1152 this._consThreshold = consThreshold;
1153 this._has_consThreshold = true;
1157 * Sets the value of field 'conservationSelected'.
1159 * @param conservationSelected
1160 * the value of field 'conservationSelected'.
1162 public void setConservationSelected(final boolean conservationSelected)
1164 this._conservationSelected = conservationSelected;
1165 this._has_conservationSelected = true;
1169 * Sets the value of field 'fontName'.
1172 * the value of field 'fontName'.
1174 public void setFontName(final java.lang.String fontName)
1176 this._fontName = fontName;
1180 * Sets the value of field 'fontSize'.
1183 * the value of field 'fontSize'.
1185 public void setFontSize(final int fontSize)
1187 this._fontSize = fontSize;
1188 this._has_fontSize = true;
1192 * Sets the value of field 'fontStyle'.
1195 * the value of field 'fontStyle'.
1197 public void setFontStyle(final int fontStyle)
1199 this._fontStyle = fontStyle;
1200 this._has_fontStyle = true;
1204 * Sets the value of field 'height'.
1207 * the value of field 'height'.
1209 public void setHeight(final int height)
1211 this._height = height;
1212 this._has_height = true;
1216 * Sets the value of field 'pidSelected'.
1218 * @param pidSelected
1219 * the value of field 'pidSelected'.
1221 public void setPidSelected(final boolean pidSelected)
1223 this._pidSelected = pidSelected;
1224 this._has_pidSelected = true;
1228 * Sets the value of field 'pidThreshold'.
1230 * @param pidThreshold
1231 * the value of field 'pidThreshold'.
1233 public void setPidThreshold(final int pidThreshold)
1235 this._pidThreshold = pidThreshold;
1236 this._has_pidThreshold = true;
1240 * Sets the value of field 'renderGaps'.
1243 * the value of field 'renderGaps'.
1245 public void setRenderGaps(final boolean renderGaps)
1247 this._renderGaps = renderGaps;
1248 this._has_renderGaps = true;
1252 * Sets the value of field 'showAnnotation'.
1254 * @param showAnnotation
1255 * the value of field 'showAnnotation'.
1257 public void setShowAnnotation(final boolean showAnnotation)
1259 this._showAnnotation = showAnnotation;
1260 this._has_showAnnotation = true;
1264 * Sets the value of field 'showBoxes'.
1267 * the value of field 'showBoxes'.
1269 public void setShowBoxes(final boolean showBoxes)
1271 this._showBoxes = showBoxes;
1272 this._has_showBoxes = true;
1276 * Sets the value of field 'showColourText'.
1278 * @param showColourText
1279 * the value of field 'showColourText'.
1281 public void setShowColourText(final boolean showColourText)
1283 this._showColourText = showColourText;
1284 this._has_showColourText = true;
1288 * Sets the value of field 'showConservation'.
1290 * @param showConservation
1291 * the value of field 'showConservation'
1293 public void setShowConservation(final boolean showConservation)
1295 this._showConservation = showConservation;
1296 this._has_showConservation = true;
1300 * Sets the value of field 'showFullId'.
1303 * the value of field 'showFullId'.
1305 public void setShowFullId(final boolean showFullId)
1307 this._showFullId = showFullId;
1308 this._has_showFullId = true;
1312 * Sets the value of field 'showIdentity'.
1314 * @param showIdentity
1315 * the value of field 'showIdentity'.
1317 public void setShowIdentity(final boolean showIdentity)
1319 this._showIdentity = showIdentity;
1320 this._has_showIdentity = true;
1324 * Sets the value of field 'showQuality'.
1326 * @param showQuality
1327 * the value of field 'showQuality'.
1329 public void setShowQuality(final boolean showQuality)
1331 this._showQuality = showQuality;
1332 this._has_showQuality = true;
1336 * Sets the value of field 'showSequenceFeatures'.
1338 * @param showSequenceFeatures
1339 * the value of field 'showSequenceFeatures'.
1341 public void setShowSequenceFeatures(final boolean showSequenceFeatures)
1343 this._showSequenceFeatures = showSequenceFeatures;
1344 this._has_showSequenceFeatures = true;
1348 * Sets the value of field 'showText'.
1351 * the value of field 'showText'.
1353 public void setShowText(final boolean showText)
1355 this._showText = showText;
1356 this._has_showText = true;
1360 * Sets the value of field 'startRes'.
1363 * the value of field 'startRes'.
1365 public void setStartRes(final int startRes)
1367 this._startRes = startRes;
1368 this._has_startRes = true;
1372 * Sets the value of field 'startSeq'.
1375 * the value of field 'startSeq'.
1377 public void setStartSeq(final int startSeq)
1379 this._startSeq = startSeq;
1380 this._has_startSeq = true;
1384 * Sets the value of field 'title'.
1387 * the value of field 'title'.
1389 public void setTitle(final java.lang.String title)
1391 this._title = title;
1395 * Sets the value of field 'width'.
1398 * the value of field 'width'.
1400 public void setWidth(final int width)
1402 this._width = width;
1403 this._has_width = true;
1407 * Sets the value of field 'wrapAlignment'.
1409 * @param wrapAlignment
1410 * the value of field 'wrapAlignment'.
1412 public void setWrapAlignment(final boolean wrapAlignment)
1414 this._wrapAlignment = wrapAlignment;
1415 this._has_wrapAlignment = true;
1419 * Sets the value of field 'xpos'.
1422 * the value of field 'xpos'.
1424 public void setXpos(final int xpos)
1427 this._has_xpos = true;
1431 * Sets the value of field 'ypos'.
1434 * the value of field 'ypos'.
1436 public void setYpos(final int ypos)
1439 this._has_ypos = true;
1446 * @throws org.exolab.castor.xml.MarshalException
1447 * if object is null or if any SAXException is thrown during
1449 * @throws org.exolab.castor.xml.ValidationException
1450 * if this object is an invalid instance according to the schema
1451 * @return the unmarshaled jalview.binding.Viewport
1453 public static jalview.binding.Viewport unmarshal(
1454 final java.io.Reader reader)
1455 throws org.exolab.castor.xml.MarshalException,
1456 org.exolab.castor.xml.ValidationException
1458 return (jalview.binding.Viewport) Unmarshaller.unmarshal(
1459 jalview.binding.Viewport.class, reader);
1465 * @throws org.exolab.castor.xml.ValidationException
1466 * if this object is an invalid instance according to the schema
1468 public void validate() throws org.exolab.castor.xml.ValidationException
1470 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1471 validator.validate(this);