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