From 8def9b1990b937b039d682d6a7b093dcfea130c2 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 13 Nov 2006 11:09:14 +0000 Subject: [PATCH] text colour saved --- src/jalview/schemabinding/version2/JGroup.java | 159 ++++++++++++++++++++ .../schemabinding/version2/JGroupDescriptor.java | 123 +++++++++++++++ src/jalview/schemabinding/version2/Viewport.java | 159 ++++++++++++++++++++ .../schemabinding/version2/ViewportDescriptor.java | 123 +++++++++++++++ 4 files changed, 564 insertions(+) diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java index f3fe3e9..06eb940 100755 --- a/src/jalview/schemabinding/version2/JGroup.java +++ b/src/jalview/schemabinding/version2/JGroup.java @@ -126,6 +126,36 @@ public class JGroup implements java.io.Serializable { private boolean _has_colourText; /** + * Field _textCol1 + */ + private int _textCol1; + + /** + * keeps track of state for field: _textCol1 + */ + private boolean _has_textCol1; + + /** + * Field _textCol2 + */ + private int _textCol2; + + /** + * keeps track of state for field: _textCol2 + */ + private boolean _has_textCol2; + + /** + * Field _textColThreshold + */ + private int _textColThreshold; + + /** + * keeps track of state for field: _textColThreshold + */ + private boolean _has_textColThreshold; + + /** * Field _seqList */ private java.util.Vector _seqList; @@ -245,6 +275,33 @@ public class JGroup implements java.io.Serializable { } //-- void deleteStart() /** + * Method deleteTextCol1 + * + */ + public void deleteTextCol1() + { + this._has_textCol1= false; + } //-- void deleteTextCol1() + + /** + * Method deleteTextCol2 + * + */ + public void deleteTextCol2() + { + this._has_textCol2= false; + } //-- void deleteTextCol2() + + /** + * Method deleteTextColThreshold + * + */ + public void deleteTextColThreshold() + { + this._has_textColThreshold= false; + } //-- void deleteTextColThreshold() + + /** * Method enumerateSeq * * @@ -415,6 +472,39 @@ public class JGroup implements java.io.Serializable { } //-- int getStart() /** + * Returns the value of field 'textCol1'. + * + * @return int + * @return the value of field 'textCol1'. + */ + public int getTextCol1() + { + return this._textCol1; + } //-- int getTextCol1() + + /** + * Returns the value of field 'textCol2'. + * + * @return int + * @return the value of field 'textCol2'. + */ + public int getTextCol2() + { + return this._textCol2; + } //-- int getTextCol2() + + /** + * Returns the value of field 'textColThreshold'. + * + * @return int + * @return the value of field 'textColThreshold'. + */ + public int getTextColThreshold() + { + return this._textColThreshold; + } //-- int getTextColThreshold() + + /** * Method hasColourText * * @@ -511,6 +601,42 @@ public class JGroup implements java.io.Serializable { } //-- boolean hasStart() /** + * Method hasTextCol1 + * + * + * + * @return boolean + */ + public boolean hasTextCol1() + { + return this._has_textCol1; + } //-- boolean hasTextCol1() + + /** + * Method hasTextCol2 + * + * + * + * @return boolean + */ + public boolean hasTextCol2() + { + return this._has_textCol2; + } //-- boolean hasTextCol2() + + /** + * Method hasTextColThreshold + * + * + * + * @return boolean + */ + public boolean hasTextColThreshold() + { + return this._has_textColThreshold; + } //-- boolean hasTextColThreshold() + + /** * Method isValid * * @@ -723,6 +849,39 @@ public class JGroup implements java.io.Serializable { } //-- void setStart(int) /** + * Sets the value of field 'textCol1'. + * + * @param textCol1 the value of field 'textCol1'. + */ + public void setTextCol1(int textCol1) + { + this._textCol1 = textCol1; + this._has_textCol1 = true; + } //-- void setTextCol1(int) + + /** + * Sets the value of field 'textCol2'. + * + * @param textCol2 the value of field 'textCol2'. + */ + public void setTextCol2(int textCol2) + { + this._textCol2 = textCol2; + this._has_textCol2 = true; + } //-- void setTextCol2(int) + + /** + * Sets the value of field 'textColThreshold'. + * + * @param textColThreshold the value of field 'textColThreshold' + */ + public void setTextColThreshold(int textColThreshold) + { + this._textColThreshold = textColThreshold; + this._has_textColThreshold = true; + } //-- void setTextColThreshold(int) + + /** * Method unmarshal * * diff --git a/src/jalview/schemabinding/version2/JGroupDescriptor.java b/src/jalview/schemabinding/version2/JGroupDescriptor.java index 231c631..1985c61 100755 --- a/src/jalview/schemabinding/version2/JGroupDescriptor.java +++ b/src/jalview/schemabinding/version2/JGroupDescriptor.java @@ -465,6 +465,129 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextCol1()) + return null; + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextCol2()) + return null; + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + JGroup target = (JGroup) object; + if(!target.hasTextColThreshold()) + return null; + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + JGroup target = (JGroup) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _seqList diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java index 7562424..db055bf 100755 --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -271,6 +271,36 @@ public class Viewport implements java.io.Serializable { private boolean _has_gatheredViews; /** + * Field _textCol1 + */ + private int _textCol1; + + /** + * keeps track of state for field: _textCol1 + */ + private boolean _has_textCol1; + + /** + * Field _textCol2 + */ + private int _textCol2; + + /** + * keeps track of state for field: _textCol2 + */ + private boolean _has_textCol2; + + /** + * Field _textColThreshold + */ + private int _textColThreshold; + + /** + * keeps track of state for field: _textColThreshold + */ + private boolean _has_textColThreshold; + + /** * Field _annotationColours */ private jalview.schemabinding.version2.AnnotationColours _annotationColours; @@ -476,6 +506,33 @@ public class Viewport implements java.io.Serializable { } //-- void deleteStartSeq() /** + * Method deleteTextCol1 + * + */ + public void deleteTextCol1() + { + this._has_textCol1= false; + } //-- void deleteTextCol1() + + /** + * Method deleteTextCol2 + * + */ + public void deleteTextCol2() + { + this._has_textCol2= false; + } //-- void deleteTextCol2() + + /** + * Method deleteTextColThreshold + * + */ + public void deleteTextColThreshold() + { + this._has_textColThreshold= false; + } //-- void deleteTextColThreshold() + + /** * Method deleteWidth * */ @@ -803,6 +860,39 @@ public class Viewport implements java.io.Serializable { } //-- int getStartSeq() /** + * Returns the value of field 'textCol1'. + * + * @return int + * @return the value of field 'textCol1'. + */ + public int getTextCol1() + { + return this._textCol1; + } //-- int getTextCol1() + + /** + * Returns the value of field 'textCol2'. + * + * @return int + * @return the value of field 'textCol2'. + */ + public int getTextCol2() + { + return this._textCol2; + } //-- int getTextCol2() + + /** + * Returns the value of field 'textColThreshold'. + * + * @return int + * @return the value of field 'textColThreshold'. + */ + public int getTextColThreshold() + { + return this._textColThreshold; + } //-- int getTextColThreshold() + + /** * Returns the value of field 'title'. * * @return String @@ -1073,6 +1163,42 @@ public class Viewport implements java.io.Serializable { } //-- boolean hasStartSeq() /** + * Method hasTextCol1 + * + * + * + * @return boolean + */ + public boolean hasTextCol1() + { + return this._has_textCol1; + } //-- boolean hasTextCol1() + + /** + * Method hasTextCol2 + * + * + * + * @return boolean + */ + public boolean hasTextCol2() + { + return this._has_textCol2; + } //-- boolean hasTextCol2() + + /** + * Method hasTextColThreshold + * + * + * + * @return boolean + */ + public boolean hasTextColThreshold() + { + return this._has_textColThreshold; + } //-- boolean hasTextColThreshold() + + /** * Method hasWidth * * @@ -1455,6 +1581,39 @@ public class Viewport implements java.io.Serializable { } //-- void setStartSeq(int) /** + * Sets the value of field 'textCol1'. + * + * @param textCol1 the value of field 'textCol1'. + */ + public void setTextCol1(int textCol1) + { + this._textCol1 = textCol1; + this._has_textCol1 = true; + } //-- void setTextCol1(int) + + /** + * Sets the value of field 'textCol2'. + * + * @param textCol2 the value of field 'textCol2'. + */ + public void setTextCol2(int textCol2) + { + this._textCol2 = textCol2; + this._has_textCol2 = true; + } //-- void setTextCol2(int) + + /** + * Sets the value of field 'textColThreshold'. + * + * @param textColThreshold the value of field 'textColThreshold' + */ + public void setTextColThreshold(int textColThreshold) + { + this._textColThreshold = textColThreshold; + this._has_textColThreshold = true; + } //-- void setTextColThreshold(int) + + /** * Sets the value of field 'title'. * * @param title the value of field 'title'. diff --git a/src/jalview/schemabinding/version2/ViewportDescriptor.java b/src/jalview/schemabinding/version2/ViewportDescriptor.java index 00167ad..e32317c 100755 --- a/src/jalview/schemabinding/version2/ViewportDescriptor.java +++ b/src/jalview/schemabinding/version2/ViewportDescriptor.java @@ -1106,6 +1106,129 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); + //-- _textCol1 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextCol1()) + return null; + return new java.lang.Integer(target.getTextCol1()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol1(); + return; + } + target.setTextCol1( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol1 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textCol2 + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextCol2()) + return null; + return new java.lang.Integer(target.getTextCol2()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextCol2(); + return; + } + target.setTextCol2( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textCol2 + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _textColThreshold + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute); + handler = (new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Viewport target = (Viewport) object; + if(!target.hasTextColThreshold()) + return null; + return new java.lang.Integer(target.getTextColThreshold()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Viewport target = (Viewport) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTextColThreshold(); + return; + } + target.setTextColThreshold( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + } ); + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _textColThreshold + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _annotationColours -- 1.7.10.2