2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.binding;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class Viewport implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
40 * Field _conservationSelected.
42 private boolean _conservationSelected;
45 * keeps track of state for field: _conservationSelected
47 private boolean _has_conservationSelected;
52 private boolean _pidSelected;
55 * keeps track of state for field: _pidSelected
57 private boolean _has_pidSelected;
62 private java.lang.String _bgColour;
65 * Field _consThreshold.
67 private int _consThreshold;
70 * keeps track of state for field: _consThreshold
72 private boolean _has_consThreshold;
75 * Field _pidThreshold.
77 private int _pidThreshold;
80 * keeps track of state for field: _pidThreshold
82 private boolean _has_pidThreshold;
87 private java.lang.String _title;
92 private boolean _showFullId;
95 * keeps track of state for field: _showFullId
97 private boolean _has_showFullId;
102 private boolean _showText;
105 * keeps track of state for field: _showText
107 private boolean _has_showText;
110 * Field _showColourText.
112 private boolean _showColourText;
115 * keeps track of state for field: _showColourText
117 private boolean _has_showColourText;
122 private boolean _showBoxes;
125 * keeps track of state for field: _showBoxes
127 private boolean _has_showBoxes;
130 * Field _wrapAlignment.
132 private boolean _wrapAlignment;
135 * keeps track of state for field: _wrapAlignment
137 private boolean _has_wrapAlignment;
142 private boolean _renderGaps;
145 * keeps track of state for field: _renderGaps
147 private boolean _has_renderGaps;
150 * Field _showSequenceFeatures.
152 private boolean _showSequenceFeatures;
155 * keeps track of state for field: _showSequenceFeatures
157 private boolean _has_showSequenceFeatures;
160 * Field _showAnnotation.
162 private boolean _showAnnotation;
165 * keeps track of state for field: _showAnnotation
167 private boolean _has_showAnnotation;
170 * Field _showConservation.
172 private boolean _showConservation;
175 * keeps track of state for field: _showConservation
177 private boolean _has_showConservation;
180 * Field _showQuality.
182 private boolean _showQuality;
185 * keeps track of state for field: _showQuality
187 private boolean _has_showQuality;
190 * Field _showIdentity.
192 private boolean _showIdentity;
195 * keeps track of state for field: _showIdentity
197 private boolean _has_showIdentity;
205 * keeps track of state for field: _xpos
207 private boolean _has_xpos;
215 * keeps track of state for field: _ypos
217 private boolean _has_ypos;
225 * keeps track of state for field: _width
227 private boolean _has_width;
235 * keeps track of state for field: _height
237 private boolean _has_height;
242 private int _startRes;
245 * keeps track of state for field: _startRes
247 private boolean _has_startRes;
252 private int _startSeq;
255 * keeps track of state for field: _startSeq
257 private boolean _has_startSeq;
262 private java.lang.String _fontName;
267 private int _fontSize;
270 * keeps track of state for field: _fontSize
272 private boolean _has_fontSize;
277 private int _fontStyle;
280 * keeps track of state for field: _fontStyle
282 private boolean _has_fontStyle;
299 public void deleteConsThreshold()
301 this._has_consThreshold = false;
306 public void deleteConservationSelected()
308 this._has_conservationSelected = false;
313 public void deleteFontSize()
315 this._has_fontSize = false;
320 public void deleteFontStyle()
322 this._has_fontStyle = false;
327 public void deleteHeight()
329 this._has_height = false;
334 public void deletePidSelected()
336 this._has_pidSelected = false;
341 public void deletePidThreshold()
343 this._has_pidThreshold = false;
348 public void deleteRenderGaps()
350 this._has_renderGaps = false;
355 public void deleteShowAnnotation()
357 this._has_showAnnotation = false;
362 public void deleteShowBoxes()
364 this._has_showBoxes = false;
369 public void deleteShowColourText()
371 this._has_showColourText = false;
376 public void deleteShowConservation()
378 this._has_showConservation = false;
383 public void deleteShowFullId()
385 this._has_showFullId = false;
390 public void deleteShowIdentity()
392 this._has_showIdentity = false;
397 public void deleteShowQuality()
399 this._has_showQuality = false;
404 public void deleteShowSequenceFeatures()
406 this._has_showSequenceFeatures = false;
411 public void deleteShowText()
413 this._has_showText = false;
418 public void deleteStartRes()
420 this._has_startRes = false;
425 public void deleteStartSeq()
427 this._has_startSeq = false;
432 public void deleteWidth()
434 this._has_width = false;
439 public void deleteWrapAlignment()
441 this._has_wrapAlignment = false;
446 public void deleteXpos()
448 this._has_xpos = false;
453 public void deleteYpos()
455 this._has_ypos = false;
459 * Returns the value of field 'bgColour'.
461 * @return the value of field 'BgColour'.
463 public java.lang.String getBgColour()
465 return this._bgColour;
469 * Returns the value of field 'consThreshold'.
471 * @return the value of field 'ConsThreshold'.
473 public int getConsThreshold()
475 return this._consThreshold;
479 * Returns the value of field 'conservationSelected'.
481 * @return the value of field 'ConservationSelected'.
483 public boolean getConservationSelected()
485 return this._conservationSelected;
489 * Returns the value of field 'fontName'.
491 * @return the value of field 'FontName'.
493 public java.lang.String getFontName()
495 return this._fontName;
499 * Returns the value of field 'fontSize'.
501 * @return the value of field 'FontSize'.
503 public int getFontSize()
505 return this._fontSize;
509 * Returns the value of field 'fontStyle'.
511 * @return the value of field 'FontStyle'.
513 public int getFontStyle()
515 return this._fontStyle;
519 * Returns the value of field 'height'.
521 * @return the value of field 'Height'.
523 public int getHeight()
529 * Returns the value of field 'pidSelected'.
531 * @return the value of field 'PidSelected'.
533 public boolean getPidSelected()
535 return this._pidSelected;
539 * Returns the value of field 'pidThreshold'.
541 * @return the value of field 'PidThreshold'.
543 public int getPidThreshold()
545 return this._pidThreshold;
549 * Returns the value of field 'renderGaps'.
551 * @return the value of field 'RenderGaps'.
553 public boolean getRenderGaps()
555 return this._renderGaps;
559 * Returns the value of field 'showAnnotation'.
561 * @return the value of field 'ShowAnnotation'.
563 public boolean getShowAnnotation()
565 return this._showAnnotation;
569 * Returns the value of field 'showBoxes'.
571 * @return the value of field 'ShowBoxes'.
573 public boolean getShowBoxes()
575 return this._showBoxes;
579 * Returns the value of field 'showColourText'.
581 * @return the value of field 'ShowColourText'.
583 public boolean getShowColourText()
585 return this._showColourText;
589 * Returns the value of field 'showConservation'.
591 * @return the value of field 'ShowConservation'.
593 public boolean getShowConservation()
595 return this._showConservation;
599 * Returns the value of field 'showFullId'.
601 * @return the value of field 'ShowFullId'.
603 public boolean getShowFullId()
605 return this._showFullId;
609 * Returns the value of field 'showIdentity'.
611 * @return the value of field 'ShowIdentity'.
613 public boolean getShowIdentity()
615 return this._showIdentity;
619 * Returns the value of field 'showQuality'.
621 * @return the value of field 'ShowQuality'.
623 public boolean getShowQuality()
625 return this._showQuality;
629 * Returns the value of field 'showSequenceFeatures'.
631 * @return the value of field 'ShowSequenceFeatures'.
633 public boolean getShowSequenceFeatures()
635 return this._showSequenceFeatures;
639 * Returns the value of field 'showText'.
641 * @return the value of field 'ShowText'.
643 public boolean getShowText()
645 return this._showText;
649 * Returns the value of field 'startRes'.
651 * @return the value of field 'StartRes'.
653 public int getStartRes()
655 return this._startRes;
659 * Returns the value of field 'startSeq'.
661 * @return the value of field 'StartSeq'.
663 public int getStartSeq()
665 return this._startSeq;
669 * Returns the value of field 'title'.
671 * @return the value of field 'Title'.
673 public java.lang.String getTitle()
679 * Returns the value of field 'width'.
681 * @return the value of field 'Width'.
683 public int getWidth()
689 * Returns the value of field 'wrapAlignment'.
691 * @return the value of field 'WrapAlignment'.
693 public boolean getWrapAlignment()
695 return this._wrapAlignment;
699 * Returns the value of field 'xpos'.
701 * @return the value of field 'Xpos'.
709 * Returns the value of field 'ypos'.
711 * @return the value of field 'Ypos'.
719 * Method hasConsThreshold.
721 * @return true if at least one ConsThreshold has been added
723 public boolean hasConsThreshold()
725 return this._has_consThreshold;
729 * Method hasConservationSelected.
731 * @return true if at least one ConservationSelected has been added
733 public boolean hasConservationSelected()
735 return this._has_conservationSelected;
739 * Method hasFontSize.
741 * @return true if at least one FontSize has been added
743 public boolean hasFontSize()
745 return this._has_fontSize;
749 * Method hasFontStyle.
751 * @return true if at least one FontStyle has been added
753 public boolean hasFontStyle()
755 return this._has_fontStyle;
761 * @return true if at least one Height has been added
763 public boolean hasHeight()
765 return this._has_height;
769 * Method hasPidSelected.
771 * @return true if at least one PidSelected has been added
773 public boolean hasPidSelected()
775 return this._has_pidSelected;
779 * Method hasPidThreshold.
781 * @return true if at least one PidThreshold has been added
783 public boolean hasPidThreshold()
785 return this._has_pidThreshold;
789 * Method hasRenderGaps.
791 * @return true if at least one RenderGaps has been added
793 public boolean hasRenderGaps()
795 return this._has_renderGaps;
799 * Method hasShowAnnotation.
801 * @return true if at least one ShowAnnotation has been added
803 public boolean hasShowAnnotation()
805 return this._has_showAnnotation;
809 * Method hasShowBoxes.
811 * @return true if at least one ShowBoxes has been added
813 public boolean hasShowBoxes()
815 return this._has_showBoxes;
819 * Method hasShowColourText.
821 * @return true if at least one ShowColourText has been added
823 public boolean hasShowColourText()
825 return this._has_showColourText;
829 * Method hasShowConservation.
831 * @return true if at least one ShowConservation has been added
833 public boolean hasShowConservation()
835 return this._has_showConservation;
839 * Method hasShowFullId.
841 * @return true if at least one ShowFullId has been added
843 public boolean hasShowFullId()
845 return this._has_showFullId;
849 * Method hasShowIdentity.
851 * @return true if at least one ShowIdentity has been added
853 public boolean hasShowIdentity()
855 return this._has_showIdentity;
859 * Method hasShowQuality.
861 * @return true if at least one ShowQuality has been added
863 public boolean hasShowQuality()
865 return this._has_showQuality;
869 * Method hasShowSequenceFeatures.
871 * @return true if at least one ShowSequenceFeatures has been added
873 public boolean hasShowSequenceFeatures()
875 return this._has_showSequenceFeatures;
879 * Method hasShowText.
881 * @return true if at least one ShowText has been added
883 public boolean hasShowText()
885 return this._has_showText;
889 * Method hasStartRes.
891 * @return true if at least one StartRes has been added
893 public boolean hasStartRes()
895 return this._has_startRes;
899 * Method hasStartSeq.
901 * @return true if at least one StartSeq has been added
903 public boolean hasStartSeq()
905 return this._has_startSeq;
911 * @return true if at least one Width has been added
913 public boolean hasWidth()
915 return this._has_width;
919 * Method hasWrapAlignment.
921 * @return true if at least one WrapAlignment has been added
923 public boolean hasWrapAlignment()
925 return this._has_wrapAlignment;
931 * @return true if at least one Xpos has been added
933 public boolean hasXpos()
935 return this._has_xpos;
941 * @return true if at least one Ypos has been added
943 public boolean hasYpos()
945 return this._has_ypos;
949 * Returns the value of field 'conservationSelected'.
951 * @return the value of field 'ConservationSelected'.
953 public boolean isConservationSelected()
955 return this._conservationSelected;
959 * Returns the value of field 'pidSelected'.
961 * @return the value of field 'PidSelected'.
963 public boolean isPidSelected()
965 return this._pidSelected;
969 * Returns the value of field 'renderGaps'.
971 * @return the value of field 'RenderGaps'.
973 public boolean isRenderGaps()
975 return this._renderGaps;
979 * Returns the value of field 'showAnnotation'.
981 * @return the value of field 'ShowAnnotation'.
983 public boolean isShowAnnotation()
985 return this._showAnnotation;
989 * Returns the value of field 'showBoxes'.
991 * @return the value of field 'ShowBoxes'.
993 public boolean isShowBoxes()
995 return this._showBoxes;
999 * Returns the value of field 'showColourText'.
1001 * @return the value of field 'ShowColourText'.
1003 public boolean isShowColourText()
1005 return this._showColourText;
1009 * Returns the value of field 'showConservation'.
1011 * @return the value of field 'ShowConservation'.
1013 public boolean isShowConservation()
1015 return this._showConservation;
1019 * Returns the value of field 'showFullId'.
1021 * @return the value of field 'ShowFullId'.
1023 public boolean isShowFullId()
1025 return this._showFullId;
1029 * Returns the value of field 'showIdentity'.
1031 * @return the value of field 'ShowIdentity'.
1033 public boolean isShowIdentity()
1035 return this._showIdentity;
1039 * Returns the value of field 'showQuality'.
1041 * @return the value of field 'ShowQuality'.
1043 public boolean isShowQuality()
1045 return this._showQuality;
1049 * Returns the value of field 'showSequenceFeatures'.
1051 * @return the value of field 'ShowSequenceFeatures'.
1053 public boolean isShowSequenceFeatures()
1055 return this._showSequenceFeatures;
1059 * Returns the value of field 'showText'.
1061 * @return the value of field 'ShowText'.
1063 public boolean isShowText()
1065 return this._showText;
1071 * @return true if this object is valid according to the schema
1073 public boolean isValid()
1078 } catch (org.exolab.castor.xml.ValidationException vex)
1086 * Returns the value of field 'wrapAlignment'.
1088 * @return the value of field 'WrapAlignment'.
1090 public boolean isWrapAlignment()
1092 return this._wrapAlignment;
1099 * @throws org.exolab.castor.xml.MarshalException
1100 * if object is null or if any SAXException is thrown during
1102 * @throws org.exolab.castor.xml.ValidationException
1103 * if this object is an invalid instance according to the schema
1105 public void marshal(final java.io.Writer out)
1106 throws org.exolab.castor.xml.MarshalException,
1107 org.exolab.castor.xml.ValidationException
1109 Marshaller.marshal(this, out);
1116 * @throws java.io.IOException
1117 * if an IOException occurs during marshaling
1118 * @throws org.exolab.castor.xml.ValidationException
1119 * if this object is an invalid instance according to the schema
1120 * @throws org.exolab.castor.xml.MarshalException
1121 * if object is null or if any SAXException is thrown during
1124 public void marshal(final org.xml.sax.ContentHandler handler)
1125 throws java.io.IOException,
1126 org.exolab.castor.xml.MarshalException,
1127 org.exolab.castor.xml.ValidationException
1129 Marshaller.marshal(this, handler);
1133 * Sets the value of field 'bgColour'.
1136 * the value of field 'bgColour'.
1138 public void setBgColour(final java.lang.String bgColour)
1140 this._bgColour = bgColour;
1144 * Sets the value of field 'consThreshold'.
1146 * @param consThreshold
1147 * the value of field 'consThreshold'.
1149 public void setConsThreshold(final int consThreshold)
1151 this._consThreshold = consThreshold;
1152 this._has_consThreshold = true;
1156 * Sets the value of field 'conservationSelected'.
1158 * @param conservationSelected
1159 * the value of field 'conservationSelected'.
1161 public void setConservationSelected(final boolean conservationSelected)
1163 this._conservationSelected = conservationSelected;
1164 this._has_conservationSelected = true;
1168 * Sets the value of field 'fontName'.
1171 * the value of field 'fontName'.
1173 public void setFontName(final java.lang.String fontName)
1175 this._fontName = fontName;
1179 * Sets the value of field 'fontSize'.
1182 * the value of field 'fontSize'.
1184 public void setFontSize(final int fontSize)
1186 this._fontSize = fontSize;
1187 this._has_fontSize = true;
1191 * Sets the value of field 'fontStyle'.
1194 * the value of field 'fontStyle'.
1196 public void setFontStyle(final int fontStyle)
1198 this._fontStyle = fontStyle;
1199 this._has_fontStyle = true;
1203 * Sets the value of field 'height'.
1206 * the value of field 'height'.
1208 public void setHeight(final int height)
1210 this._height = height;
1211 this._has_height = true;
1215 * Sets the value of field 'pidSelected'.
1217 * @param pidSelected
1218 * the value of field 'pidSelected'.
1220 public void setPidSelected(final boolean pidSelected)
1222 this._pidSelected = pidSelected;
1223 this._has_pidSelected = true;
1227 * Sets the value of field 'pidThreshold'.
1229 * @param pidThreshold
1230 * the value of field 'pidThreshold'.
1232 public void setPidThreshold(final int pidThreshold)
1234 this._pidThreshold = pidThreshold;
1235 this._has_pidThreshold = true;
1239 * Sets the value of field 'renderGaps'.
1242 * the value of field 'renderGaps'.
1244 public void setRenderGaps(final boolean renderGaps)
1246 this._renderGaps = renderGaps;
1247 this._has_renderGaps = true;
1251 * Sets the value of field 'showAnnotation'.
1253 * @param showAnnotation
1254 * the value of field 'showAnnotation'.
1256 public void setShowAnnotation(final boolean showAnnotation)
1258 this._showAnnotation = showAnnotation;
1259 this._has_showAnnotation = true;
1263 * Sets the value of field 'showBoxes'.
1266 * the value of field 'showBoxes'.
1268 public void setShowBoxes(final boolean showBoxes)
1270 this._showBoxes = showBoxes;
1271 this._has_showBoxes = true;
1275 * Sets the value of field 'showColourText'.
1277 * @param showColourText
1278 * the value of field 'showColourText'.
1280 public void setShowColourText(final boolean showColourText)
1282 this._showColourText = showColourText;
1283 this._has_showColourText = true;
1287 * Sets the value of field 'showConservation'.
1289 * @param showConservation
1290 * the value of field 'showConservation'
1292 public void setShowConservation(final boolean showConservation)
1294 this._showConservation = showConservation;
1295 this._has_showConservation = true;
1299 * Sets the value of field 'showFullId'.
1302 * the value of field 'showFullId'.
1304 public void setShowFullId(final boolean showFullId)
1306 this._showFullId = showFullId;
1307 this._has_showFullId = true;
1311 * Sets the value of field 'showIdentity'.
1313 * @param showIdentity
1314 * the value of field 'showIdentity'.
1316 public void setShowIdentity(final boolean showIdentity)
1318 this._showIdentity = showIdentity;
1319 this._has_showIdentity = true;
1323 * Sets the value of field 'showQuality'.
1325 * @param showQuality
1326 * the value of field 'showQuality'.
1328 public void setShowQuality(final boolean showQuality)
1330 this._showQuality = showQuality;
1331 this._has_showQuality = true;
1335 * Sets the value of field 'showSequenceFeatures'.
1337 * @param showSequenceFeatures
1338 * the value of field 'showSequenceFeatures'.
1340 public void setShowSequenceFeatures(final boolean showSequenceFeatures)
1342 this._showSequenceFeatures = showSequenceFeatures;
1343 this._has_showSequenceFeatures = true;
1347 * Sets the value of field 'showText'.
1350 * the value of field 'showText'.
1352 public void setShowText(final boolean showText)
1354 this._showText = showText;
1355 this._has_showText = true;
1359 * Sets the value of field 'startRes'.
1362 * the value of field 'startRes'.
1364 public void setStartRes(final int startRes)
1366 this._startRes = startRes;
1367 this._has_startRes = true;
1371 * Sets the value of field 'startSeq'.
1374 * the value of field 'startSeq'.
1376 public void setStartSeq(final int startSeq)
1378 this._startSeq = startSeq;
1379 this._has_startSeq = true;
1383 * Sets the value of field 'title'.
1386 * the value of field 'title'.
1388 public void setTitle(final java.lang.String title)
1390 this._title = title;
1394 * Sets the value of field 'width'.
1397 * the value of field 'width'.
1399 public void setWidth(final int width)
1401 this._width = width;
1402 this._has_width = true;
1406 * Sets the value of field 'wrapAlignment'.
1408 * @param wrapAlignment
1409 * the value of field 'wrapAlignment'.
1411 public void setWrapAlignment(final boolean wrapAlignment)
1413 this._wrapAlignment = wrapAlignment;
1414 this._has_wrapAlignment = true;
1418 * Sets the value of field 'xpos'.
1421 * the value of field 'xpos'.
1423 public void setXpos(final int xpos)
1426 this._has_xpos = true;
1430 * Sets the value of field 'ypos'.
1433 * the value of field 'ypos'.
1435 public void setYpos(final int ypos)
1438 this._has_ypos = true;
1445 * @throws org.exolab.castor.xml.MarshalException
1446 * if object is null or if any SAXException is thrown during
1448 * @throws org.exolab.castor.xml.ValidationException
1449 * if this object is an invalid instance according to the schema
1450 * @return the unmarshaled jalview.binding.Viewport
1452 public static jalview.binding.Viewport unmarshal(
1453 final java.io.Reader reader)
1454 throws org.exolab.castor.xml.MarshalException,
1455 org.exolab.castor.xml.ValidationException
1457 return (jalview.binding.Viewport) Unmarshaller.unmarshal(
1458 jalview.binding.Viewport.class, reader);
1464 * @throws org.exolab.castor.xml.ValidationException
1465 * if this object is an invalid instance according to the schema
1467 public void validate() throws org.exolab.castor.xml.ValidationException
1469 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1470 validator.validate(this);