1 Clazz.declarePackage ("jalview.viewmodel.styles");
2 Clazz.load (["jalview.api.ViewStyleI", "java.awt.Color"], "jalview.viewmodel.styles.ViewStyle", ["java.lang.Boolean"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.abovePIDThreshold = false;
8 this.colourAppliesToAllGroups = false;
9 this.centreColumnLabels = false;
10 this.showdbrefs = false;
11 this.shownpfeats = false;
12 this.colourByReferenceSeq = false;
13 this.conservationColourSelected = false;
14 this.displayReferenceSeq = false;
16 this.renderGaps = true;
17 this.rightAlignIds = false;
18 this.scaleAboveWrapped = false;
19 this.scaleLeftWrapped = true;
20 this.scaleRightWrapped = true;
21 this.seqNameItalics = false;
22 this.showAnnotation = true;
23 this.showBoxes = true;
24 this.showColourText = false;
25 this.showHiddenMarkers = true;
26 this.showJVSuffix = true;
27 this.showSeqFeaturesHeight = false;
28 this.showSequenceFeatures = false;
30 this.showUnconserved = false;
31 this.textColour = null;
32 this.textColour2 = null;
34 this.thresholdTextColour = 0;
35 this.upperCasebold = false;
38 this.scaleProteinAsCdna = true;
39 this.wrapAlignment = false;
40 this.wrappedWidth = 0;
42 Clazz.instantialize (this, arguments);
43 }, jalview.viewmodel.styles, "ViewStyle", null, jalview.api.ViewStyleI);
44 Clazz.prepareFields (c$, function () {
45 this.textColour = java.awt.Color.black;
46 this.textColour2 = java.awt.Color.white;
48 Clazz.makeConstructor (c$,
50 this.setAbovePIDThreshold (vs.getAbovePIDThreshold ());
51 this.setCentreColumnLabels (vs.isCentreColumnLabels ());
52 this.setCharHeight (vs.getCharHeight ());
53 this.setCharWidth (vs.getCharWidth ());
54 this.setColourAppliesToAllGroups (vs.getColourAppliesToAllGroups ());
55 this.setColourByReferenceSeq (vs.isColourByReferenceSeq ());
56 this.setColourText (vs.getColourText ());
57 this.setConservationColourSelected (vs.isConservationColourSelected ());
58 this.setConservationSelected (vs.getConservationSelected ());
59 this.setDisplayReferenceSeq (vs.isDisplayReferenceSeq ());
60 this.setFontName (vs.getFontName ());
61 this.setFontSize (vs.getFontSize ());
62 this.setFontStyle (vs.getFontStyle ());
63 this.setIdWidth (vs.getIdWidth ());
64 this.setIncrement (vs.getIncrement ());
65 this.setRenderGaps (vs.isRenderGaps ());
66 this.setRightAlignIds (vs.isRightAlignIds ());
67 this.setScaleAboveWrapped (vs.getScaleAboveWrapped ());
68 this.setScaleLeftWrapped (vs.getScaleLeftWrapped ());
69 this.setScaleProteinAsCdna (vs.isScaleProteinAsCdna ());
70 this.setScaleRightWrapped (vs.getScaleRightWrapped ());
71 this.setSeqNameItalics (vs.isSeqNameItalics ());
72 this.setShowAnnotation (vs.isShowAnnotation ());
73 this.setShowBoxes (vs.getShowBoxes ());
74 this.setShowColourText (vs.isShowColourText ());
75 this.setShowDBRefs (vs.isShowDBRefs ());
76 this.setShowHiddenMarkers (vs.getShowHiddenMarkers ());
77 this.setShowJVSuffix (vs.getShowJVSuffix ());
78 this.setShowNPFeats (vs.isShowNPFeats ());
79 this.setShowSequenceFeaturesHeight (vs.isShowSequenceFeaturesHeight ());
80 this.setShowSequenceFeatures (vs.isShowSequenceFeatures ());
81 this.setShowText (vs.getShowText ());
82 this.setShowUnconserved (vs.getShowUnconserved ());
83 this.setTextColour (vs.getTextColour ());
84 this.setTextColour2 (vs.getTextColour2 ());
85 this.setThreshold (vs.getThreshold ());
86 this.setThresholdTextColour (vs.getThresholdTextColour ());
87 this.setUpperCasebold (vs.isUpperCasebold ());
88 this.setWrapAlignment (vs.getWrapAlignment ());
89 this.setWrappedWidth (vs.getWrappedWidth ());
90 }, "jalview.api.ViewStyleI");
91 Clazz.makeConstructor (c$,
94 Clazz.overrideMethod (c$, "equals",
96 if (other == null || !(Clazz.instanceOf (other, jalview.viewmodel.styles.ViewStyle))) {
99 var match = (this.getAbovePIDThreshold () == vs.getAbovePIDThreshold () && this.isCentreColumnLabels () == vs.isCentreColumnLabels () && this.getCharHeight () == vs.getCharHeight () && this.getCharWidth () == vs.getCharWidth () && this.getColourAppliesToAllGroups () == vs.getColourAppliesToAllGroups () && this.isColourByReferenceSeq () == vs.isColourByReferenceSeq () && this.getColourText () == vs.getColourText () && this.isConservationColourSelected () == vs.isConservationColourSelected () && this.getConservationSelected () == vs.getConservationSelected () && this.isDisplayReferenceSeq () == vs.isDisplayReferenceSeq () && this.getFontSize () == vs.getFontSize () && this.getFontStyle () == vs.getFontStyle () && this.getIdWidth () == vs.getIdWidth () && this.getIncrement () == vs.getIncrement () && this.isRenderGaps () == vs.isRenderGaps () && this.isRightAlignIds () == vs.isRightAlignIds () && this.getScaleAboveWrapped () == vs.getScaleAboveWrapped () && this.getScaleLeftWrapped () == vs.getScaleLeftWrapped () && this.isScaleProteinAsCdna () == vs.isScaleProteinAsCdna () && this.getScaleRightWrapped () == vs.getScaleRightWrapped () && this.isSeqNameItalics () == vs.isSeqNameItalics () && this.isShowAnnotation () == vs.isShowAnnotation () && this.getShowBoxes () == vs.getShowBoxes () && this.isShowColourText () == vs.isShowColourText () && this.isShowDBRefs () == vs.isShowDBRefs () && this.getShowHiddenMarkers () == vs.getShowHiddenMarkers () && this.getShowJVSuffix () == vs.getShowJVSuffix () && this.isShowNPFeats () == vs.isShowNPFeats () && this.isShowSequenceFeaturesHeight () == vs.isShowSequenceFeaturesHeight () && this.isShowSequenceFeatures () == vs.isShowSequenceFeatures () && this.getShowText () == vs.getShowText () && this.getShowUnconserved () == vs.getShowUnconserved () && this.getThreshold () == vs.getThreshold () && this.getThresholdTextColour () == vs.getThresholdTextColour () && this.isUpperCasebold () == vs.isUpperCasebold () && this.getWrapAlignment () == vs.getWrapAlignment () && this.getWrappedWidth () == vs.getWrappedWidth ());
100 match = match && String.valueOf (this.getFontName ()).equals (String.valueOf (vs.getFontName ()));
101 match = match && String.valueOf (this.getTextColour ()).equals (String.valueOf (vs.getTextColour ()));
102 match = match && String.valueOf (this.getTextColour2 ()).equals (String.valueOf (vs.getTextColour2 ()));
105 Clazz.overrideMethod (c$, "hashCode",
109 hash += m++ * Boolean.$valueOf (this.abovePIDThreshold).hashCode ();
110 hash += m++ * Boolean.$valueOf (this.centreColumnLabels).hashCode ();
111 hash += m++ * Boolean.$valueOf (this.colourAppliesToAllGroups).hashCode ();
112 hash += m++ * Boolean.$valueOf (this.displayReferenceSeq).hashCode ();
113 hash += m++ * Boolean.$valueOf (this.renderGaps).hashCode ();
114 hash += m++ * Boolean.$valueOf (this.rightAlignIds).hashCode ();
115 hash += m++ * Boolean.$valueOf (this.scaleProteinAsCdna).hashCode ();
116 hash += m++ * Boolean.$valueOf (this.scaleRightWrapped).hashCode ();
117 hash += m++ * Boolean.$valueOf (this.seqNameItalics).hashCode ();
118 hash += m++ * Boolean.$valueOf (this.showAnnotation).hashCode ();
119 hash += m++ * Boolean.$valueOf (this.showBoxes).hashCode ();
120 hash += m++ * Boolean.$valueOf (this.showdbrefs).hashCode ();
121 hash += m++ * Boolean.$valueOf (this.showJVSuffix).hashCode ();
122 hash += m++ * Boolean.$valueOf (this.showSequenceFeatures).hashCode ();
123 hash += m++ * Boolean.$valueOf (this.showUnconserved).hashCode ();
124 hash += m++ * Boolean.$valueOf (this.wrapAlignment).hashCode ();
125 hash += m++ * this.charHeight;
126 hash += m++ * this.charWidth;
127 hash += m++ * this.fontSize;
128 hash += m++ * this.fontStyle;
129 hash += m++ * this.idWidth;
130 hash += String.valueOf (this.fontName).hashCode ();
133 Clazz.defineMethod (c$, "isUpperCasebold",
135 return this.upperCasebold;
137 Clazz.overrideMethod (c$, "setUpperCasebold",
138 function (upperCasebold) {
139 this.upperCasebold = upperCasebold;
141 Clazz.defineMethod (c$, "getAbovePIDThreshold",
143 return this.abovePIDThreshold;
145 Clazz.defineMethod (c$, "getCharHeight",
147 return this.charHeight;
149 Clazz.defineMethod (c$, "getCharWidth",
151 return this.charWidth;
153 Clazz.defineMethod (c$, "getColourAppliesToAllGroups",
155 return this.colourAppliesToAllGroups;
157 Clazz.defineMethod (c$, "getColourText",
159 return this.showColourText;
161 Clazz.defineMethod (c$, "getConservationSelected",
163 return this.conservationColourSelected;
165 Clazz.defineMethod (c$, "getIncrement",
167 return this.increment;
169 Clazz.defineMethod (c$, "getScaleAboveWrapped",
171 return this.scaleAboveWrapped;
173 Clazz.defineMethod (c$, "getScaleLeftWrapped",
175 return this.scaleLeftWrapped;
177 Clazz.defineMethod (c$, "getScaleRightWrapped",
179 return this.scaleRightWrapped;
181 Clazz.defineMethod (c$, "getShowBoxes",
183 return this.showBoxes;
185 Clazz.defineMethod (c$, "getShowHiddenMarkers",
187 return this.showHiddenMarkers;
189 Clazz.defineMethod (c$, "getShowJVSuffix",
191 return this.showJVSuffix;
193 Clazz.defineMethod (c$, "getShowText",
195 return this.showText;
197 Clazz.defineMethod (c$, "getShowUnconserved",
199 return this.showUnconserved;
201 Clazz.defineMethod (c$, "getTextColour",
203 return this.textColour;
205 Clazz.defineMethod (c$, "getTextColour2",
207 return this.textColour2;
209 Clazz.defineMethod (c$, "getThreshold",
211 return this.threshold;
213 Clazz.defineMethod (c$, "getThresholdTextColour",
215 return this.thresholdTextColour;
217 Clazz.defineMethod (c$, "getWrapAlignment",
219 return this.wrapAlignment;
221 Clazz.defineMethod (c$, "getWrappedWidth",
223 return this.wrappedWidth;
225 Clazz.defineMethod (c$, "isColourByReferenceSeq",
227 return this.colourByReferenceSeq;
229 Clazz.defineMethod (c$, "isConservationColourSelected",
231 return this.conservationColourSelected;
233 Clazz.defineMethod (c$, "isDisplayReferenceSeq",
235 return this.displayReferenceSeq;
237 Clazz.defineMethod (c$, "isRenderGaps",
239 return this.renderGaps;
241 Clazz.defineMethod (c$, "isRightAlignIds",
243 return this.rightAlignIds;
245 Clazz.defineMethod (c$, "isSeqNameItalics",
247 return this.seqNameItalics;
249 Clazz.defineMethod (c$, "isShowAnnotation",
251 return this.showAnnotation;
253 Clazz.defineMethod (c$, "isShowColourText",
255 return this.showColourText;
257 Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight",
259 return this.showSeqFeaturesHeight;
261 Clazz.defineMethod (c$, "isShowSequenceFeatures",
263 return this.showSequenceFeatures;
265 Clazz.overrideMethod (c$, "setAbovePIDThreshold",
267 this.abovePIDThreshold = b;
269 Clazz.overrideMethod (c$, "setCharHeight",
273 Clazz.overrideMethod (c$, "setCharWidth",
277 Clazz.overrideMethod (c$, "setColourAppliesToAllGroups",
279 this.colourAppliesToAllGroups = b;
281 Clazz.overrideMethod (c$, "setColourByReferenceSeq",
282 function (colourByReferenceSeq) {
283 this.colourByReferenceSeq = colourByReferenceSeq;
285 Clazz.overrideMethod (c$, "setColourText",
287 this.showColourText = state;
289 Clazz.overrideMethod (c$, "setConservationColourSelected",
290 function (conservationColourSelected) {
291 this.conservationColourSelected = conservationColourSelected;
293 Clazz.overrideMethod (c$, "setConservationSelected",
295 this.conservationColourSelected = b;
297 Clazz.overrideMethod (c$, "setDisplayReferenceSeq",
298 function (displayReferenceSeq) {
299 this.displayReferenceSeq = displayReferenceSeq;
301 Clazz.overrideMethod (c$, "setIncrement",
303 this.increment = inc;
305 Clazz.overrideMethod (c$, "setRenderGaps",
307 this.renderGaps = state;
309 Clazz.overrideMethod (c$, "setRightAlignIds",
310 function (rightAlignIds) {
311 this.rightAlignIds = rightAlignIds;
313 Clazz.overrideMethod (c$, "setScaleAboveWrapped",
315 this.scaleAboveWrapped = b;
317 Clazz.overrideMethod (c$, "setScaleLeftWrapped",
319 this.scaleLeftWrapped = b;
321 Clazz.overrideMethod (c$, "setScaleRightWrapped",
323 this.scaleRightWrapped = b;
325 Clazz.overrideMethod (c$, "setSeqNameItalics",
327 this.seqNameItalics = italics;
329 Clazz.overrideMethod (c$, "setShowAnnotation",
331 this.showAnnotation = b;
333 Clazz.overrideMethod (c$, "setShowBoxes",
335 this.showBoxes = state;
337 Clazz.overrideMethod (c$, "setShowColourText",
338 function (showColourText) {
339 this.showColourText = showColourText;
341 Clazz.overrideMethod (c$, "setShowHiddenMarkers",
343 this.showHiddenMarkers = show;
345 Clazz.overrideMethod (c$, "setShowJVSuffix",
347 this.showJVSuffix = b;
349 Clazz.overrideMethod (c$, "setShowSequenceFeaturesHeight",
350 function (selected) {
351 this.showSeqFeaturesHeight = selected;
353 Clazz.overrideMethod (c$, "setShowSequenceFeatures",
355 this.showSequenceFeatures = b;
357 Clazz.overrideMethod (c$, "setShowText",
359 this.showText = state;
361 Clazz.overrideMethod (c$, "setShowUnconserved",
362 function (showunconserved) {
363 this.showUnconserved = showunconserved;
365 Clazz.overrideMethod (c$, "setTextColour",
366 function (textColour) {
367 this.textColour = textColour;
368 }, "java.awt.Color");
369 Clazz.overrideMethod (c$, "setTextColour2",
370 function (textColour2) {
371 this.textColour2 = textColour2;
372 }, "java.awt.Color");
373 Clazz.overrideMethod (c$, "setThreshold",
375 this.threshold = thresh;
377 Clazz.overrideMethod (c$, "setThresholdTextColour",
378 function (thresholdTextColour) {
379 this.thresholdTextColour = thresholdTextColour;
381 Clazz.overrideMethod (c$, "setWrapAlignment",
383 this.wrapAlignment = state;
385 Clazz.overrideMethod (c$, "setWrappedWidth",
387 this.wrappedWidth = w;
389 Clazz.overrideMethod (c$, "sameStyle",
391 return this.equals (that);
392 }, "jalview.api.ViewStyleI");
393 Clazz.defineMethod (c$, "getFontName",
395 return this.fontName;
397 Clazz.defineMethod (c$, "getFontSize",
399 return this.fontSize;
401 Clazz.defineMethod (c$, "getFontStyle",
403 return this.fontStyle;
405 Clazz.overrideMethod (c$, "setFontName",
407 this.fontName = name;
409 Clazz.overrideMethod (c$, "setFontSize",
411 this.fontSize = size;
413 Clazz.overrideMethod (c$, "setFontStyle",
415 this.fontStyle = style;
417 Clazz.defineMethod (c$, "getIdWidth",
421 Clazz.overrideMethod (c$, "setIdWidth",
423 this.idWidth = idWidth;
425 Clazz.defineMethod (c$, "isCentreColumnLabels",
427 return this.centreColumnLabels;
429 Clazz.overrideMethod (c$, "setCentreColumnLabels",
430 function (centreColumnLabels) {
431 this.centreColumnLabels = centreColumnLabels;
433 Clazz.defineMethod (c$, "isShowDBRefs",
435 return this.showdbrefs;
437 Clazz.overrideMethod (c$, "setShowDBRefs",
438 function (showdbrefs) {
439 this.showdbrefs = showdbrefs;
441 Clazz.defineMethod (c$, "isShowNPFeats",
443 return this.shownpfeats;
445 Clazz.overrideMethod (c$, "setShowNPFeats",
446 function (shownpfeats) {
447 this.shownpfeats = shownpfeats;
449 Clazz.defineMethod (c$, "isScaleProteinAsCdna",
451 return this.scaleProteinAsCdna;
453 Clazz.overrideMethod (c$, "setScaleProteinAsCdna",
455 this.scaleProteinAsCdna = b;