2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.binding;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Viewport implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
43 * Field _conservationSelected.
45 private boolean _conservationSelected;
48 * keeps track of state for field: _conservationSelected
50 private boolean _has_conservationSelected;
55 private boolean _pidSelected;
58 * keeps track of state for field: _pidSelected
60 private boolean _has_pidSelected;
65 private java.lang.String _bgColour;
68 * Field _consThreshold.
70 private int _consThreshold;
73 * keeps track of state for field: _consThreshold
75 private boolean _has_consThreshold;
78 * Field _pidThreshold.
80 private int _pidThreshold;
83 * keeps track of state for field: _pidThreshold
85 private boolean _has_pidThreshold;
90 private java.lang.String _title;
95 private boolean _showFullId;
98 * keeps track of state for field: _showFullId
100 private boolean _has_showFullId;
105 private boolean _showText;
108 * keeps track of state for field: _showText
110 private boolean _has_showText;
113 * Field _showColourText.
115 private boolean _showColourText;
118 * keeps track of state for field: _showColourText
120 private boolean _has_showColourText;
125 private boolean _showBoxes;
128 * keeps track of state for field: _showBoxes
130 private boolean _has_showBoxes;
133 * Field _wrapAlignment.
135 private boolean _wrapAlignment;
138 * keeps track of state for field: _wrapAlignment
140 private boolean _has_wrapAlignment;
145 private boolean _renderGaps;
148 * keeps track of state for field: _renderGaps
150 private boolean _has_renderGaps;
153 * Field _showSequenceFeatures.
155 private boolean _showSequenceFeatures;
158 * keeps track of state for field: _showSequenceFeatures
160 private boolean _has_showSequenceFeatures;
163 * Field _showAnnotation.
165 private boolean _showAnnotation;
168 * keeps track of state for field: _showAnnotation
170 private boolean _has_showAnnotation;
173 * Field _showConservation.
175 private boolean _showConservation;
178 * keeps track of state for field: _showConservation
180 private boolean _has_showConservation;
183 * Field _showQuality.
185 private boolean _showQuality;
188 * keeps track of state for field: _showQuality
190 private boolean _has_showQuality;
193 * Field _showIdentity.
195 private boolean _showIdentity;
198 * keeps track of state for field: _showIdentity
200 private boolean _has_showIdentity;
208 * keeps track of state for field: _xpos
210 private boolean _has_xpos;
218 * keeps track of state for field: _ypos
220 private boolean _has_ypos;
228 * keeps track of state for field: _width
230 private boolean _has_width;
238 * keeps track of state for field: _height
240 private boolean _has_height;
245 private int _startRes;
248 * keeps track of state for field: _startRes
250 private boolean _has_startRes;
255 private int _startSeq;
258 * keeps track of state for field: _startSeq
260 private boolean _has_startSeq;
265 private java.lang.String _fontName;
270 private int _fontSize;
273 * keeps track of state for field: _fontSize
275 private boolean _has_fontSize;
280 private int _fontStyle;
283 * keeps track of state for field: _fontStyle
285 private boolean _has_fontStyle;
302 public void deleteConsThreshold()
304 this._has_consThreshold = false;
309 public void deleteConservationSelected()
311 this._has_conservationSelected = false;
316 public void deleteFontSize()
318 this._has_fontSize = false;
323 public void deleteFontStyle()
325 this._has_fontStyle = false;
330 public void deleteHeight()
332 this._has_height = false;
337 public void deletePidSelected()
339 this._has_pidSelected = false;
344 public void deletePidThreshold()
346 this._has_pidThreshold = false;
351 public void deleteRenderGaps()
353 this._has_renderGaps = false;
358 public void deleteShowAnnotation()
360 this._has_showAnnotation = false;
365 public void deleteShowBoxes()
367 this._has_showBoxes = false;
372 public void deleteShowColourText()
374 this._has_showColourText = false;
379 public void deleteShowConservation()
381 this._has_showConservation = false;
386 public void deleteShowFullId()
388 this._has_showFullId = false;
393 public void deleteShowIdentity()
395 this._has_showIdentity = false;
400 public void deleteShowQuality()
402 this._has_showQuality = false;
407 public void deleteShowSequenceFeatures()
409 this._has_showSequenceFeatures = false;
414 public void deleteShowText()
416 this._has_showText = false;
421 public void deleteStartRes()
423 this._has_startRes = false;
428 public void deleteStartSeq()
430 this._has_startSeq = false;
435 public void deleteWidth()
437 this._has_width = false;
442 public void deleteWrapAlignment()
444 this._has_wrapAlignment = false;
449 public void deleteXpos()
451 this._has_xpos = false;
456 public void deleteYpos()
458 this._has_ypos = false;
462 * Returns the value of field 'bgColour'.
464 * @return the value of field 'BgColour'.
466 public java.lang.String getBgColour()
468 return this._bgColour;
472 * Returns the value of field 'consThreshold'.
474 * @return the value of field 'ConsThreshold'.
476 public int getConsThreshold()
478 return this._consThreshold;
482 * Returns the value of field 'conservationSelected'.
484 * @return the value of field 'ConservationSelected'.
486 public boolean getConservationSelected()
488 return this._conservationSelected;
492 * Returns the value of field 'fontName'.
494 * @return the value of field 'FontName'.
496 public java.lang.String getFontName()
498 return this._fontName;
502 * Returns the value of field 'fontSize'.
504 * @return the value of field 'FontSize'.
506 public int getFontSize()
508 return this._fontSize;
512 * Returns the value of field 'fontStyle'.
514 * @return the value of field 'FontStyle'.
516 public int getFontStyle()
518 return this._fontStyle;
522 * Returns the value of field 'height'.
524 * @return the value of field 'Height'.
526 public int getHeight()
532 * Returns the value of field 'pidSelected'.
534 * @return the value of field 'PidSelected'.
536 public boolean getPidSelected()
538 return this._pidSelected;
542 * Returns the value of field 'pidThreshold'.
544 * @return the value of field 'PidThreshold'.
546 public int getPidThreshold()
548 return this._pidThreshold;
552 * Returns the value of field 'renderGaps'.
554 * @return the value of field 'RenderGaps'.
556 public boolean getRenderGaps()
558 return this._renderGaps;
562 * Returns the value of field 'showAnnotation'.
564 * @return the value of field 'ShowAnnotation'.
566 public boolean getShowAnnotation()
568 return this._showAnnotation;
572 * Returns the value of field 'showBoxes'.
574 * @return the value of field 'ShowBoxes'.
576 public boolean getShowBoxes()
578 return this._showBoxes;
582 * Returns the value of field 'showColourText'.
584 * @return the value of field 'ShowColourText'.
586 public boolean getShowColourText()
588 return this._showColourText;
592 * Returns the value of field 'showConservation'.
594 * @return the value of field 'ShowConservation'.
596 public boolean getShowConservation()
598 return this._showConservation;
602 * Returns the value of field 'showFullId'.
604 * @return the value of field 'ShowFullId'.
606 public boolean getShowFullId()
608 return this._showFullId;
612 * Returns the value of field 'showIdentity'.
614 * @return the value of field 'ShowIdentity'.
616 public boolean getShowIdentity()
618 return this._showIdentity;
622 * Returns the value of field 'showQuality'.
624 * @return the value of field 'ShowQuality'.
626 public boolean getShowQuality()
628 return this._showQuality;
632 * Returns the value of field 'showSequenceFeatures'.
634 * @return the value of field 'ShowSequenceFeatures'.
636 public boolean getShowSequenceFeatures()
638 return this._showSequenceFeatures;
642 * Returns the value of field 'showText'.
644 * @return the value of field 'ShowText'.
646 public boolean getShowText()
648 return this._showText;
652 * Returns the value of field 'startRes'.
654 * @return the value of field 'StartRes'.
656 public int getStartRes()
658 return this._startRes;
662 * Returns the value of field 'startSeq'.
664 * @return the value of field 'StartSeq'.
666 public int getStartSeq()
668 return this._startSeq;
672 * Returns the value of field 'title'.
674 * @return the value of field 'Title'.
676 public java.lang.String getTitle()
682 * Returns the value of field 'width'.
684 * @return the value of field 'Width'.
686 public int getWidth()
692 * Returns the value of field 'wrapAlignment'.
694 * @return the value of field 'WrapAlignment'.
696 public boolean getWrapAlignment()
698 return this._wrapAlignment;
702 * Returns the value of field 'xpos'.
704 * @return the value of field 'Xpos'.
712 * Returns the value of field 'ypos'.
714 * @return the value of field 'Ypos'.
722 * Method hasConsThreshold.
724 * @return true if at least one ConsThreshold has been added
726 public boolean hasConsThreshold()
728 return this._has_consThreshold;
732 * Method hasConservationSelected.
734 * @return true if at least one ConservationSelected has been added
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 added
876 public boolean hasShowSequenceFeatures()
878 return this._has_showSequenceFeatures;
882 * Method hasShowText.
884 * @return true if at least one ShowText has been added
886 public boolean hasShowText()
888 return this._has_showText;
892 * Method hasStartRes.
894 * @return true if at least one StartRes has been added
896 public boolean hasStartRes()
898 return this._has_startRes;
902 * Method hasStartSeq.
904 * @return true if at least one StartSeq has been added
906 public boolean hasStartSeq()
908 return this._has_startSeq;
914 * @return true if at least one Width has been added
916 public boolean hasWidth()
918 return this._has_width;
922 * Method hasWrapAlignment.
924 * @return true if at least one WrapAlignment has been added
926 public boolean hasWrapAlignment()
928 return this._has_wrapAlignment;
934 * @return true if at least one Xpos has been added
936 public boolean hasXpos()
938 return this._has_xpos;
944 * @return true if at least one Ypos has been added
946 public boolean hasYpos()
948 return this._has_ypos;
952 * Returns the value of field 'conservationSelected'.
954 * @return the value of field 'ConservationSelected'.
956 public boolean isConservationSelected()
958 return this._conservationSelected;
962 * Returns the value of field 'pidSelected'.
964 * @return the value of field 'PidSelected'.
966 public boolean isPidSelected()
968 return this._pidSelected;
972 * Returns the value of field 'renderGaps'.
974 * @return the value of field 'RenderGaps'.
976 public boolean isRenderGaps()
978 return this._renderGaps;
982 * Returns the value of field 'showAnnotation'.
984 * @return the value of field 'ShowAnnotation'.
986 public boolean isShowAnnotation()
988 return this._showAnnotation;
992 * Returns the value of field 'showBoxes'.
994 * @return the value of field 'ShowBoxes'.
996 public boolean isShowBoxes()
998 return this._showBoxes;
1002 * Returns the value of field 'showColourText'.
1004 * @return the value of field 'ShowColourText'.
1006 public boolean isShowColourText()
1008 return this._showColourText;
1012 * Returns the value of field 'showConservation'.
1014 * @return the value of field 'ShowConservation'.
1016 public boolean isShowConservation()
1018 return this._showConservation;
1022 * Returns the value of field 'showFullId'.
1024 * @return the value of field 'ShowFullId'.
1026 public boolean isShowFullId()
1028 return this._showFullId;
1032 * Returns the value of field 'showIdentity'.
1034 * @return the value of field 'ShowIdentity'.
1036 public boolean isShowIdentity()
1038 return this._showIdentity;
1042 * Returns the value of field 'showQuality'.
1044 * @return the value of field 'ShowQuality'.
1046 public boolean isShowQuality()
1048 return this._showQuality;
1052 * Returns the value of field 'showSequenceFeatures'.
1054 * @return the value of field 'ShowSequenceFeatures'.
1056 public boolean isShowSequenceFeatures()
1058 return this._showSequenceFeatures;
1062 * Returns the value of field 'showText'.
1064 * @return the value of field 'ShowText'.
1066 public boolean isShowText()
1068 return this._showText;
1074 * @return true if this object is valid according to the schema
1076 public boolean isValid()
1081 } catch (org.exolab.castor.xml.ValidationException vex)
1089 * Returns the value of field 'wrapAlignment'.
1091 * @return the value of field 'WrapAlignment'.
1093 public boolean isWrapAlignment()
1095 return this._wrapAlignment;
1102 * @throws org.exolab.castor.xml.MarshalException
1103 * if object is null or if any SAXException is thrown during
1105 * @throws org.exolab.castor.xml.ValidationException
1106 * if this object is an invalid instance according to the schema
1108 public void marshal(final java.io.Writer out)
1109 throws org.exolab.castor.xml.MarshalException,
1110 org.exolab.castor.xml.ValidationException
1112 Marshaller.marshal(this, out);
1119 * @throws java.io.IOException
1120 * if an IOException occurs during marshaling
1121 * @throws org.exolab.castor.xml.ValidationException
1122 * if this object is an invalid instance according to the schema
1123 * @throws org.exolab.castor.xml.MarshalException
1124 * if object is null or if any SAXException is thrown during
1127 public void marshal(final org.xml.sax.ContentHandler handler)
1128 throws java.io.IOException,
1129 org.exolab.castor.xml.MarshalException,
1130 org.exolab.castor.xml.ValidationException
1132 Marshaller.marshal(this, handler);
1136 * Sets the value of field 'bgColour'.
1139 * the value of field 'bgColour'.
1141 public void setBgColour(final java.lang.String bgColour)
1143 this._bgColour = bgColour;
1147 * Sets the value of field 'consThreshold'.
1149 * @param consThreshold
1150 * the value of field 'consThreshold'.
1152 public void setConsThreshold(final int consThreshold)
1154 this._consThreshold = consThreshold;
1155 this._has_consThreshold = true;
1159 * Sets the value of field 'conservationSelected'.
1161 * @param conservationSelected
1162 * the value of field 'conservationSelected'.
1164 public void setConservationSelected(final boolean conservationSelected)
1166 this._conservationSelected = conservationSelected;
1167 this._has_conservationSelected = true;
1171 * Sets the value of field 'fontName'.
1174 * the value of field 'fontName'.
1176 public void setFontName(final java.lang.String fontName)
1178 this._fontName = fontName;
1182 * Sets the value of field 'fontSize'.
1185 * the value of field 'fontSize'.
1187 public void setFontSize(final int fontSize)
1189 this._fontSize = fontSize;
1190 this._has_fontSize = true;
1194 * Sets the value of field 'fontStyle'.
1197 * the value of field 'fontStyle'.
1199 public void setFontStyle(final int fontStyle)
1201 this._fontStyle = fontStyle;
1202 this._has_fontStyle = true;
1206 * Sets the value of field 'height'.
1209 * the value of field 'height'.
1211 public void setHeight(final int height)
1213 this._height = height;
1214 this._has_height = true;
1218 * Sets the value of field 'pidSelected'.
1220 * @param pidSelected
1221 * the value of field 'pidSelected'.
1223 public void setPidSelected(final boolean pidSelected)
1225 this._pidSelected = pidSelected;
1226 this._has_pidSelected = true;
1230 * Sets the value of field 'pidThreshold'.
1232 * @param pidThreshold
1233 * the value of field 'pidThreshold'.
1235 public void setPidThreshold(final int pidThreshold)
1237 this._pidThreshold = pidThreshold;
1238 this._has_pidThreshold = true;
1242 * Sets the value of field 'renderGaps'.
1245 * the value of field 'renderGaps'.
1247 public void setRenderGaps(final boolean renderGaps)
1249 this._renderGaps = renderGaps;
1250 this._has_renderGaps = true;
1254 * Sets the value of field 'showAnnotation'.
1256 * @param showAnnotation
1257 * the value of field 'showAnnotation'.
1259 public void setShowAnnotation(final boolean showAnnotation)
1261 this._showAnnotation = showAnnotation;
1262 this._has_showAnnotation = true;
1266 * Sets the value of field 'showBoxes'.
1269 * the value of field 'showBoxes'.
1271 public void setShowBoxes(final boolean showBoxes)
1273 this._showBoxes = showBoxes;
1274 this._has_showBoxes = true;
1278 * Sets the value of field 'showColourText'.
1280 * @param showColourText
1281 * the value of field 'showColourText'.
1283 public void setShowColourText(final boolean showColourText)
1285 this._showColourText = showColourText;
1286 this._has_showColourText = true;
1290 * Sets the value of field 'showConservation'.
1292 * @param showConservation
1293 * the value of field 'showConservation'
1295 public void setShowConservation(final boolean showConservation)
1297 this._showConservation = showConservation;
1298 this._has_showConservation = true;
1302 * Sets the value of field 'showFullId'.
1305 * the value of field 'showFullId'.
1307 public void setShowFullId(final boolean showFullId)
1309 this._showFullId = showFullId;
1310 this._has_showFullId = true;
1314 * Sets the value of field 'showIdentity'.
1316 * @param showIdentity
1317 * the value of field 'showIdentity'.
1319 public void setShowIdentity(final boolean showIdentity)
1321 this._showIdentity = showIdentity;
1322 this._has_showIdentity = true;
1326 * Sets the value of field 'showQuality'.
1328 * @param showQuality
1329 * the value of field 'showQuality'.
1331 public void setShowQuality(final boolean showQuality)
1333 this._showQuality = showQuality;
1334 this._has_showQuality = true;
1338 * Sets the value of field 'showSequenceFeatures'.
1340 * @param showSequenceFeatures
1341 * the value of field 'showSequenceFeatures'.
1343 public void setShowSequenceFeatures(final boolean showSequenceFeatures)
1345 this._showSequenceFeatures = showSequenceFeatures;
1346 this._has_showSequenceFeatures = true;
1350 * Sets the value of field 'showText'.
1353 * the value of field 'showText'.
1355 public void setShowText(final boolean showText)
1357 this._showText = showText;
1358 this._has_showText = true;
1362 * Sets the value of field 'startRes'.
1365 * the value of field 'startRes'.
1367 public void setStartRes(final int startRes)
1369 this._startRes = startRes;
1370 this._has_startRes = true;
1374 * Sets the value of field 'startSeq'.
1377 * the value of field 'startSeq'.
1379 public void setStartSeq(final int startSeq)
1381 this._startSeq = startSeq;
1382 this._has_startSeq = true;
1386 * Sets the value of field 'title'.
1389 * the value of field 'title'.
1391 public void setTitle(final java.lang.String title)
1393 this._title = title;
1397 * Sets the value of field 'width'.
1400 * the value of field 'width'.
1402 public void setWidth(final int width)
1404 this._width = width;
1405 this._has_width = true;
1409 * Sets the value of field 'wrapAlignment'.
1411 * @param wrapAlignment
1412 * the value of field 'wrapAlignment'.
1414 public void setWrapAlignment(final boolean wrapAlignment)
1416 this._wrapAlignment = wrapAlignment;
1417 this._has_wrapAlignment = true;
1421 * Sets the value of field 'xpos'.
1424 * the value of field 'xpos'.
1426 public void setXpos(final int xpos)
1429 this._has_xpos = true;
1433 * Sets the value of field 'ypos'.
1436 * the value of field 'ypos'.
1438 public void setYpos(final int ypos)
1441 this._has_ypos = true;
1448 * @throws org.exolab.castor.xml.MarshalException
1449 * if object is null or if any SAXException is thrown during
1451 * @throws org.exolab.castor.xml.ValidationException
1452 * if this object is an invalid instance according to the schema
1453 * @return the unmarshaled jalview.binding.Viewport
1455 public static jalview.binding.Viewport unmarshal(
1456 final java.io.Reader reader)
1457 throws org.exolab.castor.xml.MarshalException,
1458 org.exolab.castor.xml.ValidationException
1460 return (jalview.binding.Viewport) Unmarshaller.unmarshal(
1461 jalview.binding.Viewport.class, reader);
1467 * @throws org.exolab.castor.xml.ValidationException
1468 * if this object is an invalid instance according to the schema
1470 public void validate() throws org.exolab.castor.xml.ValidationException
1472 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1473 validator.validate(this);